Forum Discussion
jdwalker5
2 years agoHelper II
Rolling 4 Week Total
Hello, I'm trying to get a rolling 4 week total for each row in a summarized table. Example below with expected result. Week Item Total Rolling 4 Week Total 8 A 5 50 7 A 10...
- 2 years ago
Anonymous
2 years agoNot applicable
Hi jdwalker5
amitchandak ThxAlot Thank you very much for your prompt reply. Here please allow me to post some of my methods.
For your question, here is the method I provided:
Here's some dummy data
“Table”
Create a measure.
Rolling 4 Week Total =
CALCULATE(
SUM('Table'[Total]),
FILTER(
ALL('Table'),
'Table'[Week] > MAX('Table'[Week]) - 4
&&
'Table'[Week] <= MAX('Table'[Week])
)
)
Here is the result.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- jdwalker52 years agoHelper II
Anonymous ,
Thanks for the reply! I ended up bringing in a separate dataset where I used a SQL window function to get the result I needed, but this looks like it would work. Appreciate you looking into this!