Forum Discussion

Darwinm's avatar
Darwinm
Frequent Visitor
4 years ago
Solved

3 month rolling calculation

Hi folks, 

 

I am trying to calculate 3 month rolling rate and have been struggling to get desired results. I have perfomed the analysis in Excel before moving to Power BI and am attching a snapshot of the same. 

 

The first set of data (row 2 to 9) represents 1 month roll rate and the second set of data (row 13 to 19) displays the desired result (3 month roll rate). I would like to do something similar in Power BI and would highly appreciate if anyone can assist me in doing so. 

Further, I tried to create the following measure in Power BI (but no luck): 
Rolling 3 Current= CALCULATE(SUM(DATA[LN_Bal]),DATESINPERIOD('Calendar'[Date  (bins)],MAX('Calendar'[Date  (bins)])-1,-3,MONTH), FILTER(Data,Data[DYS_DEL]="CURRENT"))

 

 

 

Thank you in advance! 

  • Solution:
    3 month rolling = CALCULATE(
    AVERAGEX(VALUES('Calendar'[Date (bins)]),[Sales]),
    DATESINPERIOD('Calendar'[Date (bins)],MAX('Calendar'[Date (bins)]),-3,MONTH)
    )

5 Replies