Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi, I know you can create a moving average as a measure below, but i need to create a moving average as a calculated column. How do you rewrite the below as a calculated column. I think it needs datesbetween.
Moving_Average_3_Months =
CALCULATE (
AVERAGEX ( 'Session', 'Session'[Sessions] ),
DATESINPERIOD (
'Session'[FullDate],
LASTDATE ( 'Session'[FullDate] ),
-3,
MONTH
)
)
Solved! Go to Solution.
Hi @spoony,
You can create a calculated column like below:
Moving_Average_3_Month = CALCULATE (
AVERAGEX ( ALLSELECTED('Session'), 'Session'[Sessions] ),
DATESINPERIOD (
'Session'[FullDate],
LASTDATE ( 'Session'[FullDate] ),
-3,
MONTH
)
)
Best Regards,
Qiuyun Yu
Hi @spoony,
You can create a calculated column like below:
Moving_Average_3_Month = CALCULATE (
AVERAGEX ( ALLSELECTED('Session'), 'Session'[Sessions] ),
DATESINPERIOD (
'Session'[FullDate],
LASTDATE ( 'Session'[FullDate] ),
-3,
MONTH
)
)
Best Regards,
Qiuyun Yu
Thanks i'll try use it. Seems to be having issues when theres other columns and having multiple same months.
Hi @spoony,
If my DAX doesn't work, please share your sample data and expected results for our analysis.
Best Regards,
Qiuyun Yu
I think my issue seems to be when theres blank months data, and i try take it out with a page report filter, and that causes problems. Otherwise it seems to work.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!