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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
jmg80525
Helper II
Helper II

Group By Standard Deviation not working as expected. Returns 0 for values w/ variance

Lot's of solved threads that suggest using List.StandardDeviation to group value on SD. Seem easy enough. Below is a filterd set of values that clear have variance. 

jmg80525_0-1710868358071.png

 

I run Transform>Statistics>Standard Deviation and get the value of 3.26. Seems consistent.

jmg80525_0-1710868749592.png

 

 

  I then try 

{"LDSegmentIntID", "TopOfHourCentral"}, {{"SDHrValue", each List.StandardDeviation([LDSegmentIntID]) and I get this:

jmg80525_1-1710868816622.png

 

What am I missing? Why woudln't the two values be the same?

1 REPLY 1
sevenhills
Super User
Super User

I think this line of code is wrong...
{"LDSegmentIntID", "TopOfHourCentral"}, {{"SDHrValue", each List.StandardDeviation([LDSegmentIntID])
Here, you are grouping by "LDSegmentIntID", "TopOfHourCentral" and trying to get the same standard deviation for the "LDSegmentIntID". Which does not make sense. You need to use the column that you are calculating standard deviation for. 

 

#"Grouped Rows" = Table.Group(#"Changed Type", {"LDSegmentIntID", "TopOfHourCentral"}, {{"SDHrValue"}, each List.StandardDeviation([?? Value column]), type number}})



For definition, refer to this: https://learn.microsoft.com/en-us/powerquery-m/list-standarddeviation
Post the code and sample of data and what you are expecting. (after removing sensitive info).

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.