Forum Discussion
How to create variance field and variance %
- 9 years ago
Hi Anonymous,
You can create measures below:
Variance = CALCULATE(SUM(Table1[Amount]),FILTER(Table1,'Table1'[Month]=1))-CALCULATE(SUM(Table1[Amount]),FILTER(Table1,'Table1'[Month]=2))
Variance % = DIVIDE('Table1'[Variance],CALCULATE(SUM(Table1[Amount]),FILTER(ALL(Table1),'Table1'[Month]=1)))
By the way, I would suggest you display those two measures in card visuals. As you use matrix visual to display data originally, if we add two measures to this matrix, two measures values will display under each column group, means under 1, 2,...,5, each will have three columns. It will make the matrix messy, as you just want to return variance between the 1 and 2.
Best Regards,
Qiuyun Yu
Hi Anonymous,
You can create measures below:
Variance = CALCULATE(SUM(Table1[Amount]),FILTER(Table1,'Table1'[Month]=1))-CALCULATE(SUM(Table1[Amount]),FILTER(Table1,'Table1'[Month]=2))
Variance % = DIVIDE('Table1'[Variance],CALCULATE(SUM(Table1[Amount]),FILTER(ALL(Table1),'Table1'[Month]=1)))
By the way, I would suggest you display those two measures in card visuals. As you use matrix visual to display data originally, if we add two measures to this matrix, two measures values will display under each column group, means under 1, 2,...,5, each will have three columns. It will make the matrix messy, as you just want to return variance between the 1 and 2.
Best Regards,
Qiuyun Yu
This saved me from a lot of tension and helped me to achieve the result what I wanted to. Thanks for this query.