The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I have 3 months rolling average. I need to Calculate Standard Devation for 3 months rolling average. I'm using custom calender.
Please, help on this.
Here's a measure expression that shows one way to do it.
SD P3M =
VAR vMaxDate =
MAX ( 'Date'[Date] )
VAR tP3M =
CALCULATETABLE (
ADDCOLUMNS ( VALUES ( 'Date'[YearMonth] ), "cTotSales", [Total Sales] ),
ALL ( 'Date' ),
'Date'[Date] <= vMaxDate
&& 'Date'[Date]
>= EOMONTH ( vMaxDate, -3 ) + 1
)
RETURN
IF ( COUNTROWS ( tP3M ) = 3, STDEVX.S ( tP3M, [cTotSales] ) )
Pat
Hi Pat,
Thanks for your reply but It's not working.
Mavg("Fact table"."TRX_VALUE_USD"/1000000,3)-STDDEV(Mavg("Fact table"."TRX_VALUE_USD"/1000000,3))
this one created in OAC, I need to create same thing dax. Please, help me on this.
Thanks
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the July 2024 Power BI update to learn about new features.
User | Count |
---|---|
33 | |
28 | |
26 | |
25 | |
24 |
User | Count |
---|---|
50 | |
37 | |
26 | |
23 | |
19 |