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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
jjoedadorr
Frequent Visitor

Grouping / Binning with Maximum and other filters

Hi, Everyone

 

I'm currently in the process of creating a chart that tallies the number of employees based on their total training hours. I aim to organize these counts into bins/groups with a size of 0.5 hours. The column chart should adhere to the following criteria and functionalities:

 

  • binning should only include the count of employees with more than 0 training hours.
  • The binning system should include a filter that allows for specifying both a minimum and maximum value. Notably, the maximum value should include counts of employees surpassing this threshold.
  • The chart should remain responsive when filtered by date.

 

I have two datasets, namely "employeeDetails" and "trainingHours," with a relationship via the 'Employee ID' column. 

 

employeeDetails

Employee IDEmployee Name
111Ben
112Daniel
113David
114James
115John
116Samuel
117William
118Emma
119Thomas
120Mia
121Elizabeth
122Alex
123Lucas
124Eva
125Charlie

 

trainingHours:

Employee IDTraining HoursDate
1111.191/4/2023
1111.101/5/2023
1121.102/1/2023
1120.402/1/2023
1120.302/4/2023
1133.501/2/2023
1151.101/5/2023
1150.202/3/2023
1162.001/18/2023
1161.002/2/2023
1161.102/6/2023
1173.001/6/2023
1180.201/8/2023
1200.211/4/2023
1200.172/1/2023
1210.121/22/2023
1210.232/4/2023
1210.442/19/2023
1210.502/26/2023
1220.622/1/2023
1230.001/23/2023
1241.101/19/2023
1253.501/16/2023

 

Upon performing the necessary calculations, the grouping/binning chart structure should resemble the following:

jjoedadorr_0-1691403000157.png

minimum set to: 0.10

maximum set to: 3.00

note: maximum is set to 3.00 and employees with training hours greater than it should also be included (to the count) in this bin

 

and here's the same in table format:

Group/BinCount
0.102
0.501
1.003
1.501
2.001
2.500
3.004

 

Overall, the calculation I performed in Excel looks like the below:

jjoedadorr_1-1691403341327.png

 

Thank you in advance for any assistance you can offer in achieving this data visualization. Your expertise is greatly appreciated

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

I have a similar problem in the attached PBI file.  Study the method/formulas in this file and apply them to yours.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hello and thank you for sharing the PBI file. This demonstrates a useful approach for segmenting the figures and it's evident that the table is well-structured. However, I've noticed that when a 'categorical' filter is applied, it sets a static value. This means that, although your example indicates the max of '>$1M' (3.00 in my case), the flexibility to adjust it to, let's say, >500k doesn't seem to effectively group sales surpassing that new threshold. But thanks for sharing your insights. Your expertise in addressing this challenge is greatly appreciated, and it's valuable information that will help me refine my approach to this.

Hi @jjoedadorr ,

Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.

If these also don't help, please share more detailed information and description to help us clarify your scenario to test.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
v-shex-msft
Community Support
Community Support

Hi @jjoedadorr,

It seems like a segmentation analysis requirement, I'd like to suggest you take a look at the following links if these help:

Static segmentation – DAX Patterns

Dynamic segmentation – DAX Patterns

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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