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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.