Forum Discussion
Dynamic Measure based on selected filters/slicers
can you post the dax code here?
when you say fall apart, what happens exactly
Sum of last year:
LY All Rev = SUM('LY Performance'[Revenue])
Sum of this year:
TY All Rev = SUM(Performance[Revenue])
YoY Growth:
YoY Growth All Rev = ([TY All Rev]/[LY All Rev])-1
When used as a tooltip it displays the correct % value week to week, but when any slicers are engaged the % value drops dramatically which suggests it's comparing the smaller filtered value to the grand total for the previous year. They don't tally with the quoted Revenue figures used in the calculation
- vanessafvg9 years ago
Community Champion
firstly i would do a divide in dax as
YoY Growth All Rev = divide([TY All Rev],[LY All Rev])
(not sure it will make a diff but worth a try)
what is the -1 for?
- bytheway9 years agoRegular Visitor
I've updated it to:
YoY Growth All Rev = DIVIDE([TY All Rev],[LY All Rev],0)-1
and it behaves the same as before
The -1 is to give me the true growth figure (e.g.; if LY=50 and TY=100 I want that to show the growth as 100% rather than the 200% it would show without the -1
- vanessafvg9 years ago
Community Champion
and your filter, is it all in the same table?