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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Kethireddy334
New Member

Standard Devation

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.

2 REPLIES 2
ppm1
Solution Sage
Solution Sage

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] ) )

ppm1_0-1673960879192.png

Pat

 

Microsoft Employee

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

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

July Newsletter

Fabric Community Update - July 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors