I have a fact which has relationships with 2 dimension tables.
- Direct relationship
- Through Bridge table
I have created a sum measure that should sum up the Amount column.
I have created two queries that don't give me the expected result
Query 1:
Sum of Amount:= CALCULATE(SUM(Fact[Amount]))
Current result : The Grand total is 600
Query 2:
Sum of Amount:= IF(HASONEVALUE('Dimension 1'[value]),CALCULATE(SUM(Fact[Amount])),
SUMX(VALUES('Dimension 1'[value]),CALCULATE(SUM(Fact[Amount]))))
Current result : The Grand Total is 400
Expected result : When the Dimension 1 is selected, the grand total should be 400 and when the Dimension 2 selected the Grand total should be 600.
Could anyone please help me to achieve this?