Forum Discussion
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
- DarwinmFrequent Visitor
Solution:
3 month rolling = CALCULATE(
AVERAGEX(VALUES('Calendar'[Date (bins)]),[Sales]),
DATESINPERIOD('Calendar'[Date (bins)],MAX('Calendar'[Date (bins)]),-3,MONTH)
) - ribisht17Super User
Did you check this one >> Solved: Rolling 3 months calculation - Microsoft Power BI Community
Regards,
Ritesh
- DarwinmFrequent Visitor
I figured out the calculation. Had to work around a bit of hussle but got the measure right. 🙂
- ribisht17Super User
Wow!You can share the solution here and mark the post as solution