Forum Discussion
julpol
2 years agoRegular Visitor
Multiple variance calculation in matrix
Hi everyone I'm doing a report in which I have multiple years as columns and some categories as rows. I would like to see two variance columns at the end, first as a difference between the last y...
- Anonymous2 years ago
Hi julpol ,
Did I solve your problem? Or you can also try turning off the following two options:
Best regards,
Community Support Team_ Scott Chang
julpol
2 years agoRegular Visitor
Hi Anonymous thank you for your help. Is it possible to change the matrix so it does not show the variance fields as values per each Year column? I would like only the value from the "value" field to be visible per each year and then at the end see two variance columns.
Thanks
Anonymous
2 years agoNot applicable
Hi julpol ,
Is this your desired result?
Variance% = var _t = ADDCOLUMNS('Table',"pre",MAXX(FILTER(ALL('Table'),[Category]=EARLIER([Category])&&[Year]=EARLIER([Year])-1),[Value]))
RETURN IF(ISINSCOPE('Table'[Year]),BLANK(),DIVIDE(MAX('Table'[Value])-MAXX(_t,[pre]),SUM('Table'[Value])))
Variance$ = var _t = ADDCOLUMNS('Table',"pre",MAXX(FILTER(ALL('Table'),[Category]=EARLIER([Category])&&[Year]=EARLIER([Year])-1),[Value]))
RETURN IF(ISINSCOPE('Table'[Year]),BLANK(),MAX('Table'[Value])-MAXX(_t,[pre]))
Hope it helps!
Best regards,
Community Support Team_ Scott Chang
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.