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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Wdunnes
Regular Visitor

Conditional binning / summing of data

Hello, 

I have a dataset with rows which represent periods of work.

I would like to group these periods of work based on a few conditions. 

- The first row starts a period of 3 hours. 

- If between the previous row end-date and the next row start date there is less than 1-hour, it is counted for the existing period

- If between the previous row end-date and the next row start date there is more than 1 hour and it starts outside of the initial 3 hours period, it is counted as a new period. 

- In case the 'worktime' is less than 180 minutes in a period, the worker is eligible for 180 minutes

- In case the 'worktime' is over 180 minutes in a period, the worker is eligible for sum of 'worktime'. 

 

I need to analyse how effective planning of workers is done, by analysing effective and uneffective time. 

 

Example data including desired output:

https://wetransfer.com/downloads/a77aaa9a701fff52e20ca0b807f1a54e20230327170912/97b15ce9fd58d72203ad...

 

I have no idea where to start. So I was hoping that you can help me out!

0 REPLIES 0

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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