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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Sb00cheh
Frequent Visitor

Groupings & Binning from a Calc Field

Hi all,

 

Wondering if there's a simple solve for this. I have a report for PTO analysis (in timesheet form), and I'm trying to calculate PTO usuage from each of those individuals within set period of time (quarter & years). I've created a calc field to sum pto time, and it's linked to a date table. I'm trying to get these groups of folks into groups of "No PTO used, less than a week, 1 - 2 weeks, 2 - 3 weeks and 4+ weeks". My IIF measure formula works (IF(pto)<=0 "no pto", etc) from an employee individual level in a table, however, when I want to analyze the count of those groups within a certain BU, Region, Company, it's just utilizing a sum of all PTO within each set. How would I be able to get a count? I've tried creating a reference table with the groups, but struggling to make the relationships especially since I'm trying to break it out by certasin periods of time. 

 

Any help would be greatly appreciated.

3 REPLIES 3
v-saisrao-msft
Community Support
Community Support

Hi @Sb00cheh ,

I hope you had a chance to review the solution shared By   . If it addressed your question, please consider accepting it as the solution — it helps others find answers more quickly.
If you're still facing the issue, feel free to reply, and we’ll be happy to assist further.

And also provide the sample file or PBiX for accurate solution to the issue. Please show the expected outcome based on the sample data you provided.

Need help uploading data? 

https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

 

Thank you.

danextian
Super User
Super User

Hi @Sb00cheh 

 

It appears you created a calculated column to bin which isn't dynamic and isn't aware of slicer selections. You will need to use a disconnected table and a measure referencing it. I have several sample tutorials on YouTube which might address your use case:

https://youtu.be/ErNozA58sLs

https://youtu.be/dEuDlcSzk7k

 

If you want a more suited answer, pease provide a workable sample data (not an image), your expected result from the same sample data and your reasoning behind. You may post a link to Excel or a sanitized copy of your PBIX stored in the cloud.  https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

 

 

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Ritaf1983
Super User
Super User

Hi @Sb00cheh 

Hi,
It’s a bit hard to fully understand the structure without a PBIX file or a sample dataset, but based on what you’ve described, this sounds like a classic case of dynamic segmentation – where you want to bucket people into ranges based on calculated PTO usage.

I’d highly recommend watching this excellent video by SQLBI that explains how to implement dynamic segmentation using DAX:
https://www.youtube.com/watch?v=FDa0I3J3h-c

 

If your scenario is different, I recommend sharing a simplified PBIX file that includes your data model logic (without any sensitive information) and showing the expected output in a visual. You can upload it to any public cloud (e.g., OneDrive, Google Drive) and share the link here. That will help others give more targeted guidance.

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
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.