Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Frequent Visitor

Standard Deviation by Group

Hi and thank you in advance,


Big Picture: I need to create a flag that tells me when a value exceeds 95% confidence interval (the accepted tolerance limit in this case). These flags will then be counted and reported about by hierarchical group (city, state, country for example) so individual managers can investigate why those exceed expected parameters. 

Technical Issue: I'm having difficulty calculating the standard deviation by row by hierachy group.  



The formula used in "desired standard deviation" column is stdev.p(if($A:$A=$A2,$B:$B)).


How do I replicate this in Power BI?


Thanks so much for your help.




P.S. Bonus cool points if your solution can be extended to other math functions. 

Super User
Super User

You could create a summary table like

Summary Table =
    "Average", AVERAGE ( 'Table'[Value] ),
    "Std Dev", STDEV.P ( 'Table'[Value] )

and then link that to your main fact table. You would then be able to create columns on your fact table which refer to the summary table, e.g. 

Flag =
IF (
        > RELATED ( 'Summary Table'[Average] ) + RELATED ( 'Summary Table'[Std dev] ),

Helpful resources

PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors