Cumulative Total =
CALCULATE (
SUM ( Table[Value] ),
FILTER (
ALL ( Table[Index] ),
Table[Index]
<= MAX ( Table[Index] )
)
)
I'm trying to understand how the above formula logically works.
1st the CALCULATEs 2nd parameter gets evaluated. The 2nd param returns a filtered table containing a single column.
In the FILTER the 1st param removes any filter from the index column. The 2nd param of filter checks that the index should be less than or equal to max from outer table.
But how does the CALCULATEs SUM do cumulative? Does FILTER work for each record of the SUM?
question from:https://stackoverflow.com/questions/65856716/how-does-calculate-sum-max-and-logically-work-for-cumulative-total