Forum Discussion
Anonymous
2 years agoNot applicable
Variance % in Line and Bar Stacked Bar
Hi All, I'm triyng to populated the variance % for the below visual but not getting the desired result. Ideally from 5 to10 it should show then 100%( (10-5)/10) from 10 to16 it should show 6...
- Anonymous2 years ago
Hi Anonymous ,
Try this:
Measure = var _table=ADDCOLUMNS(SUMMARIZE(ALLSELECTED(VW_D_DATE),[WEEK_END_DATE]),"test",[Assessment L6W_1]) var _pre= MAXX(FILTER(_table,[WEEK_END_DATE]=MAX(VW_D_DATE[WEEK_END_DATE])-7),[test]) var _current=[Assessment L6W_1] var _percent=DIVIDE(_current-_pre,_pre,0) RETURN _percentBest Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
2 years agoNot applicable
Hi,
Thanks for the update. Still getting the same issue.
Below is the link to the PBIX file
https://drive.google.com/file/d/1RHuQ6en6kJiPZ62j6Nwvvm3k4dXA0xBR/view?usp=sharing
Anonymous
2 years agoNot applicable
Hi Anonymous ,
Try this:
Measure = var _table=ADDCOLUMNS(SUMMARIZE(ALLSELECTED(VW_D_DATE),[WEEK_END_DATE]),"test",[Assessment L6W_1])
var _pre= MAXX(FILTER(_table,[WEEK_END_DATE]=MAX(VW_D_DATE[WEEK_END_DATE])-7),[test])
var _current=[Assessment L6W_1]
var _percent=DIVIDE(_current-_pre,_pre,0)
RETURN _percent
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous2 years agoNot applicable
Anonymous It worked as expected.
Thanks 🙂