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
ChrisE15890c
Advocate I
Advocate I

Bins Value Calculation by Size of Bins

Hello Power BI community. I have searched the Internet to no avail on how the values for bins based on date range and the size of bins are calculated. I had assumed that is was based on an average possibly throwing out the min and max values for bin sizes greater than 3 but I see that is not correct. I remember finding an article on bins in the past explaining how they are calculated but cannot find it now for the life of me.

 

Below is a screenshot of my bins group. As you can see it is of type Bin, date based, min date of 1/1/2019, max date of 12/31/2023, bin type of size of bins, and bin size of 7 days. 

 

The expected value should be 4.3644 as the values for the 7 days are all the same with a value of 4.3644. If I do not use bins for the X-axis this is indeed what you see. I don't want such a busy graph thus I am using bins and the values are not always the same and really this question goes beyond this example. 

 

Y-axis Measure: 

Cost Per User = DIVIDE([Total_Cost], [Total Users], 0)
Total Users = DISTINCTCOUNT([userName])
Total_Cost = CALCULATE(SUM([Actual]), [Actual Dates] )
 

ChrisE15890c_0-1692833644532.png

 

Without bins for x-axis:

ChrisE15890c_1-1692833725992.png

 

With bins (7 day bins) for x-axis:

ChrisE15890c_3-1692834249534.png

 

Raw Data:

ChrisE15890c_4-1692834304882.png

 

If anyone can shed some light or provide a link on how the bin values are calculated I would greatly appreciate it.

 

Thanks in advance.

Chris

2 REPLIES 2
amitchandak
Super User
Super User

@ChrisE15890c , if you need bins on the measure you can refer

Dynamic Segmentation Bucketing Binning
https://community.powerbi.com/t5/Quick-Measures-Gallery/Dynamic-Segmentation-Bucketing-Binning/m-p/1...


Dynamic Segmentation, Bucketing or Binning: https://youtu.be/CuczXPj0N-k

 

Or check static one

https://www.daxpatterns.com/static-segmentation/
https://www.poweredsolutions.co/2020/01/11/dax-vs-power-query-static-segmentation-in-power-bi-dax-po...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thank you for the response but unfortunately dynamic segmentation is not what my question regarded. I am not looking to categorize and bucket on the categorization. As I explained in detail I am trying to determine how Power BI calculates the aggregate value (y-axis) for a time series of values (x-axis) bucketed by days. 

 

Thanks

Chris

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.