The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.
User | Count |
---|---|
25 | |
10 | |
8 | |
7 | |
6 |
User | Count |
---|---|
32 | |
12 | |
10 | |
10 | |
9 |