Forum Discussion
Help with Matrix
- Anonymous1 year ago
Thanks for the reply from Gabry.
Hi jhilsee ,
I used sample data, here are the exact steps:
1. Create a date table:
2. Create a relationship as shown:
3. Create a measure:
Profit Difference = VAR _minyear=MINX(ALLSELECTED('Date'[Year]),'Date'[Year]) VAR _maxyear=MAXX(ALLSELECTED('Date'[Year]),'Date'[Year]) return CALCULATE(SUM('financials'[Profit]),'Date'[Year]=_maxyear)-CALCULATE(SUM('financials'[Profit]),'Date'[Year]=_minyear)4. Create a slicer using the Year field from the Date table and replace the Year column in the matrix with the Year field from the Date table. Result:
Best Regards,
ZhuIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for the reply from Gabry.
Hi jhilsee ,
I used sample data, here are the exact steps:
1. Create a date table:
2. Create a relationship as shown:
3. Create a measure:
Profit Difference =
VAR _minyear=MINX(ALLSELECTED('Date'[Year]),'Date'[Year])
VAR _maxyear=MAXX(ALLSELECTED('Date'[Year]),'Date'[Year])
return
CALCULATE(SUM('financials'[Profit]),'Date'[Year]=_maxyear)-CALCULATE(SUM('financials'[Profit]),'Date'[Year]=_minyear)
4. Create a slicer using the Year field from the Date table and replace the Year column in the matrix with the Year field from the Date table. Result:
Best Regards,
Zhu
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.