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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello evreyone,
I am trying to calculate the rolling volatility (std dev) from a measure (var dia % = daily rets.). I need to know how to do this. And how to exclude the blank cells in this calculation. On the other hand, I need to know how to select the last 4 prices in the calculation of the moving average 4days. You can see below the picture and the code of the MM4.
MM4 =
CALCULATE (
AVERAGEX ( Precios, Precios[Valor] ),
DATESINPERIOD (
'Dim_Calendar DAX'[Date],
LASTDATE ( 'Dim_Calendar DAX'[Date] ),
-4,
DAY
)
)Thank you very much!
Can you provide complete data? For example, what is the calculation formula for measure var dia %? What is the value of Precios[Valor]? What does your separate table involving dates look like? If possible, provide the pbix file(remove sensitive info), which will help us deal with the problem better.
Best Regards,
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the November 2025 Fabric 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!