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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. 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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.