Skip to main content
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
cristian-ciia
Regular Visitor

How can I calculate the rolling volatility excluding blank cells?

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.

 

Power BI Foro.JPG

 

MM4 = 
CALCULATE (
    AVERAGEX ( Precios, Precios[Valor] ),
    DATESINPERIOD (
        'Dim_Calendar DAX'[Date],
        LASTDATE ( 'Dim_Calendar DAX'[Date] ),
        -4,
        DAY
    )
)

Thank you very much!

1 REPLY 1
Anonymous
Not applicable

Hi @cristian-ciia 

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.

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Users online (25)