I went thru all community suggestions on how to calculate this and still couldn't figure it out. I'm trying to calculate a MovingAvg (last column marked in yellow) and in addition to calculate MovingSum (column marked in light blue).
Here is the example I made in less than 10 seconds in Excel.
Why it is so hard in DAX??
My Excel doesn't represent my entire database and this is just the summary of all Web Page Categories… but you got the idea.