Forum Discussion
Rolling sum
- 5 years ago
Hi smshetty ,
You may go to Query Editor, go to Add column->Index column (from 1,,), click button "Close & Apply".
Then you may create measure like DAX below.
Rolling 3 rows = VAR i= SELECTEDVALUE(Table1[Index]) RETURN CALCULATE (SUM ( Table1[transactions value] ),FILTER ( ALLSELECTED(Table1), Table1[Index] <= i + 2 && Table1[Index] >= i ) )Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi smshetty ,
You may go to Query Editor, go to Add column->Index column (from 1,,), click button "Close & Apply".
Then you may create measure like DAX below.
Rolling 3 rows =
VAR i= SELECTEDVALUE(Table1[Index])
RETURN
CALCULATE (SUM ( Table1[transactions value] ),FILTER ( ALLSELECTED(Table1), Table1[Index] <= i + 2 && Table1[Index] >= i ) )
Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Thanks, this was very useful for me too, is there a way to find the max value of the function or would you need to create a new column?