Forum Discussion
Calculation over a moving window
heidibb try following
Rolling 6 rows =
VAR __currRow = MAX ( Table[TermAxis] )
VAR __startRow = _currRow - 5
RETURN
CALCULATE ( SUM ( Table[Value] ), Table[TermAxis] >= __startRow, Table[TermAxis] <= __currRow)
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
Thank you! It's not quite working.
I created a calculated measure using this per your example:
The output for this is just the same value as the individual term value vs. the sum of the 6 terms
- parry2k6 years agoSuper User
heidibb interesting, I just tested at my end and it is working fine, not sure what we are missing here.
- parry2k6 years agoSuper User
heidibb do you have any other filters, a relationship which will be causing this, for testing, add ALL ( TableName ) and see if it work, although it is not required.
- heidibb6 years agoHelper IV
Yes, there are other filters. Good catch! All didn't work, but ALLSELECTED did:
THANK YOU!!!