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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Calculating total hours logged (with overlapping minutes)

Hi all,

 

I am wanting to know if there is a way to calculate total hours logged by each worker in a given day? I have a total hours column, however, an employee can log time for different tasks that overlap.

 

E.g. task A time logged: 11.00am-11.30am

       task B time logged: 11.10am-11.45am

 

If i just calculate total hours as the sum, this will give me 75 mins (30+45), however the total time logged should actually be 45 mins (since they started at 11 and finished at 11.45).

 

Any help greatly appreciated

 

Thank you,

3 REPLIES 3

Hi, 

 

I have been looking for a solution to this but have not yet foudn the answer. Has anyone know of a post or a link to a website that can give me the answer?

 

Thanks

RB

Anonymous
Not applicable

@Anonymous 

 

If you have a task where you need to calculate total time but without counting overlapping periods multiple times, then the best way is to expand the periods into the required granularity (hours, minutes or seconds), and then just do DISTINCTCOUNT on their UNION. This is by far the best and THE FASTEST way to calculate such things because it only requires the Storage Engine to go to work. No Formula Engine needed.

amitchandak
Super User
Super User

@Anonymous , can you share some raw data in the exact format, This needs overlapping period calculation based on employee and date and create min max time to take diff.

 

One idea is that if the task starts in between the previous task we can end the time the previous one.

 

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

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.