Forum Discussion
Anonymous
5 years agoNot applicable
Cumulative not working correctly
https://drive.google.com/file/d/1pWvFXrZcE9s8QAq9dBjkaBSEUlJMJCRD/view?usp=sharing I am trying to get the cumulative of EW , and it is not working. Why is this happening ,I unders...
JW_van_Holst
Resolver IV
5 years agoYou don't need to force the context transition, you have to break it!
First create a calculated column:
BreakContextTransitionTable =
VAR __YMTable = SUMMARIZE(ALL('Date'), 'Date'[MonthnYear])
VAR __YMTableEW = ADDCOLUMNS(__YMTable, "@EW", [EW])
RETURN
__YMTableEW
Then add this measure:
EW =
VAR __filter = FILTER(BreakContextTransitionTable, BreakContextTransitionTable[MonthnYear] <= MAX('Date'[MonthnYear]))
RETURN
SUMX(__filter, BreakContextTransitionTable[@EW])
Giving this result:
Of course you can break the context transition by rewriting the EW measure (removing all Calculate())