Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I need to do a rolling 3, 6, and 12 month average that compares to the previous period of same length. This would mean last 3 months compared to 3 months before, last 6 months compared to the 6 months before, etc.
I have tried using the ParallelPeriod function in DAX, but wasn't able to figure it out entirely.
What series of DAX formulas would I need to compare the last 3 completed months with the 3 completed onths before? Once that logic is set, I can apply to the other time periods.
Thanks!
Solved! Go to Solution.
Hi, @TakeoffGoatMigo
You just need to modified the 'start date' in function "DATESINPERIOD" .
New measure:
Rolling Average 3 months before =
CALCULATE (
SUM ( financials[Sales] ),
DATESINPERIOD ( 'Calendar'[Date],EDATE( MAX ( 'Calendar'[Date] ),-3), -3, MONTH )
) / 3
Please check my attached pbix for more details.
Best Regards,
Community Support Team _ Eason
Hi, @TakeoffGoatMigo
Make sure you have a calendar table, then you can try formula like:
Rolling Average =
CALCULATE (
SUM ( Sheet1[Sales] ),
DATESINPERIOD ( 'Calendar'[Date], MAX ( 'Calendar'[Date] ), -3, MONTH )
) / 3
Best Regards,
Community Support Team _ Eason
This is what I had for the past 3 months, but how do I get the 3 months before that to compare to?
Thank you!
Hi, @TakeoffGoatMigo
You just need to modified the 'start date' in function "DATESINPERIOD" .
New measure:
Rolling Average 3 months before =
CALCULATE (
SUM ( financials[Sales] ),
DATESINPERIOD ( 'Calendar'[Date],EDATE( MAX ( 'Calendar'[Date] ),-3), -3, MONTH )
) / 3
Please check my attached pbix for more details.
Best Regards,
Community Support Team _ Eason
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |