Reputation: 1
How to calculate difference between column in matrix table in power BI? Below is the example
Category cool warm Diff
Colors
Blue 70 30 40
Black 50 50 0
Pink 40 60 -20
Category has many categories I have filtered out with cool and warm. I have tried
diff= CALCULATE(SUM(Value),Category="Cool") - CALCULATE(SUM(Value),Category="warm")`
but it's not working i am getting the same values of cool and warm in diff column when i am placing diff measure in the value pane.
Upvotes: 0
Views: 744
Reputation: 65
To add to this How to fix the duplicated columns in each of the subcategory.
I used the below DAX but somehow it's duplicated the calculated column "Delta TMCGP%" in all the subcategories. when i just want to show it at the end of the matrix table (Power BI)
Delta TMCGP% = CALCULATE([TMCGP%], FILTER( ALL(BC_Dashboard_V4_Standard[TYPE (groups)]), BC_Dashboard_V4_Standard[TYPE (groups)]="4_CWV") ) - CALCULATE([TMCGP%], FILTER( ALL(BC_Dashboard_V4_Standard[TYPE (groups)]), BC_Dashboard_V4_Standard[TYPE (groups)]="5_POR" ) )
Upvotes: 0