Forum Discussion
Delta value between 2 weeks
Please show a couple of rows of your "DateTable" table.
- lbendlin3 years agoSuper User
var thisweek = max(DateTable[Week])
var prevweek = calculate(max(DateTable[Week]),all(DateTable),DateTable[Week])<thisweek)- andreazambon3 years agoHelper V
Thanks for your reply, I think that I can use this to my case.
Instead of this solution, what if I want to show the difference between a week and the previous one?
For example, in WK15 I want to show the difference between WK 15 and WK14, in WK 14 the difference between WK 14 and WK 13..
- lbendlin3 years agoSuper User
you would use the same approach. Remember that "MAX" is dependent on the current filter context, and it has a different meaning in different parts of your visual. That way you can write a single measure that can compare a value with its "previous" incarnation. (Note that the new windowing functions can also be used if you are looking for alternatives)