Forum Discussion
Normal cumulative sum
- 8 years ago
Of course... :-)
You just need to also include the column you are sorting by in ALL. Like so:
Retention Cumulative = CALCULATE ( [Retention], FILTER ( ALL ( Terminations[Date of Renewals], Terminations[MonthYear Retention breakdown], Terminations[SORT COLUMN OF MonthYear Retention breakdown] ), Terminations[Date of Renewals] <= MAX ( Terminations[Date of Renewals] ) ) )Does this make sense?
Try this:
Retention Cumulative =
CALCULATE (
[Retention],
FILTER (
ALL (
Terminations[Date of Renewals],
Terminations[MonthYear Retention breakdown]
),
Terminations[Date of Renewals] <= MAX ( Terminations[Date of Renewals] )
)
)Hello Daniil,
Thank you for trying to help.
Unfortunately it didn't work.
Outcome is exactly the same.
Kind regards.
Andrej
- Daniil8 years agoKudo Kingpin
Of course... :-)
You just need to also include the column you are sorting by in ALL. Like so:
Retention Cumulative = CALCULATE ( [Retention], FILTER ( ALL ( Terminations[Date of Renewals], Terminations[MonthYear Retention breakdown], Terminations[SORT COLUMN OF MonthYear Retention breakdown] ), Terminations[Date of Renewals] <= MAX ( Terminations[Date of Renewals] ) ) )Does this make sense?
- AndrejZitnay8 years agoPost Patron
- AndrejZitnay8 years agoPost Patron
Hello Daniil,
Your solution worked fine for me.
I am now doing something similliar but instead of months I am calculating cumulatives this based on diffrence of two months [Completion_Vs_Contract] this is as well in my axis however I have there some gaps and cumulative might go down in gap months.
For example my monhts are -12 -11 -10 -9 -8 -3 -2 -1 0 1 2 3
Is there way of taking this gaps into conisderation?
Vintage Cumulative =
CALCULATE (
[Settlements],
FILTER (
ALL (
Terminations[Completion_Vs_Contract]
),
Terminations[Completion_Vs_Contract] <= MAX ( Terminations[Completion_Vs_Contract] )
)
)Many thanks.
Andrej