I am looking to put a sum of some value into a separate column on a specific row in a table visual. This is my raw table and the expected result in table visual:
Col1 Amount Col1 SumAmount MinusAmount 1 10 1 30 - 7 1 20 2 70 2 30 3 -7 2 40 3 - 7
I thought a simple measure like this will do the trick but it doesn't :
MinusAmount = IF ( MAX (Table[Col1] = 1, CALCULATE ( SUM ( Table[Amount] ), Col1 = 3 ) )
Would appreciate any hints. Thanks.
Solved! Go to Solution.
OK, thanks @AlB. I happen to have some more columns in my visual and it looks that I need to use measure with ALLSELECTED:
MinusAmount = IF ( MAX ( Table1[Col1] ) = 1, CALCULATE ( SUM ( Table1[ Amount] ), FILTER(ALLSELECTED(Table1),Table1[Col1] = 3 ) ) )