Forum Discussion
Rolling Average
- 2 years ago
ViralPatel212 , You can use these measures
Using date table
Rolling 5 = CALCULATE(Averagex(Values('Date'[Date]) , [Your measure]) ,DATESINPERIOD('Date'[Date],MAX('Date'[Date]),-5,Day))
Using window
Rolling 12 = CALCULATE(Averagex(Values('Date'[Date]) , [Your measure]) , WINDOW(-4,REL, 0, REL, ADDCOLUMNS(ALLSELECTED('Date'Date]),ORDERBY([DAte],asc)))
Use new visual calculation
MOVINGAVERAGE([Net], 5)
ViralPatel212 , You can use these measures
Using date table
Rolling 5 = CALCULATE(Averagex(Values('Date'[Date]) , [Your measure]) ,DATESINPERIOD('Date'[Date],MAX('Date'[Date]),-5,Day))
Using window
Rolling 12 = CALCULATE(Averagex(Values('Date'[Date]) , [Your measure]) , WINDOW(-4,REL, 0, REL, ADDCOLUMNS(ALLSELECTED('Date'Date]),ORDERBY([DAte],asc)))
Use new visual calculation
MOVINGAVERAGE([Net], 5)
h