Forum Discussion
reddevil
1 year agoHelper II
Table to be created using the below format
Hi Everyone: I have created a single measure for Prev and Current quarter and want to split it in a matrix using the below format, can someone guide me how do i achieve the below matrix table using ...
- 1 year ago
Hi reddevil Could you try this please create measures first for three seperatly and then do SWITCH statement in dax please check this
Create Measures:
Define prev , curr , and diff measures:PrevMeasure = CALCULATE(SUM(Table[Value]), FILTER(Table, Table[Quarter] = "Previous")) CurrMeasure = CALCULATE(SUM(Table[Value]), FILTER(Table, Table[Quarter] = "Current")) DiffMeasure = [CurrMeasure] - [PrevMeasure]
Dynamic Measure:
SelectedMeasure = SWITCH( TRUE(), SELECTEDVALUE(Table[MeasureType]) = "Prev", [PrevMeasure], SELECTEDVALUE(Table[MeasureType]) = "Curr", [CurrMeasure], SELECTEDVALUE(Table[MeasureType]) = "Diff", [DiffMeasure], BLANK() )Matrix Setup:
Add Category and Measure to rows.
Add MeasureType (Prev, Curr, Diff) to columns.
Use SelectedMeasure as values.
Apply conditional formatting for Direvtion as needed.
reddevil
1 year agoHelper II
Thank you all for the help, Akash_Varuna the measure worked.