Forum Discussion
Anonymous
3 years agoNot applicable
Rolling SUm
Hi, I have some issue in calculating the rolling Sum Jan 1 feb 2 Mar 3 Apr 4 May 5 i need dynamic cummulative total based on slicer (Month) selection for example if Feb...
- Anonymous3 years ago
Hi Anonymous ,
Try to create the following measure.
Measure = CALCULATE(SUM('Table'[Value]),FILTER(ALLSELECTED('Table'),[Date]<=MAX('Table'[Date])))Sample data is as follows. A date field is required.
Below are the results.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Greg_Deckler
Community Champion
3 years agoAnonymous Do you have any other columns like an Index or Date? If so you could do this:
Measure =
VAR __Table =
ADDCOLUMNS(
'Table',
"Rolling", SUMX(FILTER(ALLSELECTED('Table',[Index]<=EARLIER('Table'[Index])),[Value])
)
VAR __Result = SUMX(__Table,[Rolling])
RETURN
__Result