Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Source Data Example
item | amount |
AA | 10 |
AA | 5 |
BB | 3 |
BB | 3 |
after powerBI by summrize by item (categray)
item Sum
AA | 15 |
BB | 6 |
I hope power bi can show the result as Sum(AA)-Sum(BB)
In tableau ,I can using table calucation funcion to do that.
AA | 15 |
BB | 6 |
AA-BB | 9 |
I'm not sure how to implement an operation for sum measure.
Solved! Go to Solution.
Hi @fxz9,
Power BI doesn't support that. As a workaround, you can show the difference in an extra column. Please refer to below measure:
AA-BB = CALCULATE ( SUM ( Table1[amount] ), FILTER ( ALL ( Table1 ), Table1[item] = "AA" ) ) - CALCULATE ( SUM ( Table1[amount] ), FILTER ( ALL ( Table1 ), Table1[item] = "BB" ) )
Best regards,
Yuliana Gu
Hi @fxz9,
Power BI doesn't support that. As a workaround, you can show the difference in an extra column. Please refer to below measure:
AA-BB = CALCULATE ( SUM ( Table1[amount] ), FILTER ( ALL ( Table1 ), Table1[item] = "AA" ) ) - CALCULATE ( SUM ( Table1[amount] ), FILTER ( ALL ( Table1 ), Table1[item] = "BB" ) )
Best regards,
Yuliana Gu
Thanks for you replay
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
100 | |
78 | |
76 | |
52 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |