Forum Discussion
dzuurman
Helper I
5 years ago% difference between columns in matrix table
I have a matrix table, in which users can specify which years they want to compare the months of. Say in this case 2019 vs 2020 Of course having the totals of those months show up is easy enough. Bu...
- 5 years ago
Hi dzuurman ,
Suppose your table is like below:
Create a measure as below:
Measure = IF(ISINSCOPE('Table'[Year]),SUM('Table'[Amount]), var _2019=CALCULATE(SUM('Table'[Amount]),FILTER('Table','Table'[Year]=2019)) var _2020=CALCULATE(SUM('Table'[Amount]),FILTER('Table','Table'[Year]=2020)) Return _2020-_2019)And you will see:
For the related .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
v-kelly-msft
Community Support
5 years agoHi dzuurman ,
Suppose your table is like below:
Create a measure as below:
Measure = IF(ISINSCOPE('Table'[Year]),SUM('Table'[Amount]),
var _2019=CALCULATE(SUM('Table'[Amount]),FILTER('Table','Table'[Year]=2019))
var _2020=CALCULATE(SUM('Table'[Amount]),FILTER('Table','Table'[Year]=2020))
Return
_2020-_2019)
And you will see:
For the related .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!