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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
pborah
Solution Sage
Solution Sage

How to show 95% confidence interval in a histogram?

I have a histogram with reference lines created for Mean, Median, and St Dev. The histogram was created using bins (groups) created in PowerBI. I wish to show reference lines for 1 and 2 sigma on both sides of the mean. How can I achieve this?

5 REPLIES 5
lbendlin
Super User
Super User

You would use the same reference line approach?  Are you sourcing them from the Analysis tab, or do you create them from the data?

Line field calculations do not contain preset calculations for 2xStDev. Neither is there any toggle option to show area of distribution covered by +-2xStDev

pborah_0-1709323900005.png

 

As of atleast the February update for PBI, there is no separate "Analysis" tab. But to answer your question yes, I'm calculating them from what would have been the analysis tab in previous versions.

 

pborah_1-1709324003367.png

 

Would you mind sharing some sample data and to indicate the expected result?

Unfortunately I can't share sample data. You can actually create test data yourself. You literally just need one column of any random numerical values. Thereafter you can create bins for in it PowerBI and then create the histogram using a stacked column chart visual - bins on X axis and count of observations on Y. In my case the distribution is normal but yours doesn't have to be since you're just going to be testing out whether the calculation is possible.

 

Stats 101 says that if your data is normally distributed (skewed or not), approximately 95% of the observations should fall within two standard deviations on either side of the mean. That's what I'm trying to show in this visual.

 

pborah_0-1709324722308.png

 

I woudn't even know how to calculate the mean for that. Do you have to interpolate between the under/over bins on the halfway line?

 

lbendlin_0-1709326117633.png

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.