Forum Discussion

bryanang's avatar
bryanang
Frequent Visitor
3 years ago

How to Calculate Rolling Average?

I have a dataset with a date column, column called "column" (every value is 1 for simplicity), and a measure for rolling average.

 

Rolling average =
CALCULATE(
   SUM(
       vw_BI_Yield_Trend[Column]),
    DATESINPERIOD(vw_BI_Yield_Trend[MFG_SYN_OUT_DATE], MAX(vw_BI_Yield_Trend[MFG_SYN_OUT_DATE]), -3, DAY))
 
The formula seems to work initially but as i scroll from 2006 to 2023 data, I notice the summation does not tabulate right.

 


 

10 Replies