Forum Discussion
% of change in Matrix Table
Hi shzyincu,
You can use the below measure :
#diff = ( CALCULATE(SUM(test[Value]),FILTER(ALL(test[year]),test[Year]=2016))/CALCULATE(SUM(test[Value]),FILTER(ALL(test[year]),test[Year]=2017)))-1
But the problem with that will be is that when you pull it Values in matrix, it will show two columns with same value.
I will suggest you to make 3 differnet measure and use it in in table or Matrix
1. for Year 2016
CALCULATE(SUM(test[Value]),FILTER(ALL(test[year]),test[Year]=2016))
2. for year 2017
CALCULATE(SUM(test[Value]),FILTER(ALL(test[year]),test[Year]=2017))
3. for diff
%diff = ([for Year 2017]/[for Year 2016])-1
Hope this helps
-Sumit
sumit4732 thanks for your reply, i tried both and both adds columns in both years :( what should i do?
- sumit47329 years ago
Advocate II
Hi shzyincu,
I was suggesting that you create all 3 measure as mention in past reply and then pull all of them in Values, and let the column field be empty
-Sumit
- shzyincu9 years ago
Helper I
sumit4732 I did the expressions seperately and then made the third field, but still, what you mean by keep the column field empty? kindly if you can explain in detail?
- sumit47329 years ago
Advocate II
Hi shzyincu,
If you are goin for Metrix, there are three fields:
1. Rows : put the column with month name here
2. Columns : dont place any column/measure here
3. Values : put the three measures that you have created [for Year 2016 ], [for Year 2016 ], [for Diff]
You can just use a simple table also now, just pull Month, [for Year 2016 ], [for Year 2016 ], [for Diff] in values.
Hope this helps
-Sumit