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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Lucy64
Advocate II
Advocate II

Overtime Calculation

I have seen other topics relating to overtime but the calculation I need appears more complex:

 

I have data with [Date], [Shift], [ItemNumber].  There can be several entries for a shift on any one day for each ItemNumber they work on.  Each shift should work 8hrs per day and any additional hours should be calculated as overtime.  The data is stored in a SQL Database and I am using DirectQuery to connect to the data.

 

I need to show a graph showing just the overtime for each shift with ability to drill down through date i.e. Year, Quarter, Month, Day.

 

Any ideas?

1 REPLY 1
Anonymous
Not applicable

@Lucy64

 

Do you have any time brackets, like anything over 5 PM should be cateogrised as overtime? If so, you can use that as a filter in your calculation. Otherwise, you can calculate a time difference of start & end time in a separate column. On the report, you can use one of the filters (visual/page/report) to only show data where difference is more than 8 hours. 


Thanks

Kaz

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.