cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
eetigu
Frequent Visitor

Calculate Overtime Per Week

Hi Guys,

 

I need assistance with calculating overtime per week. The scenario is as follows. 

Staff are required to work for 48 hours a week and any hours that exceed 48 are regarded as overtime. My solution was to design a duty roster where supervisors create and schedule staff accordingly and the schedule information is saved to a SharePoint list. 

 

So my problem is, that I am not able to get a formula that will make sure that the scheduled hours do not exceed 48 hours while also keeping track of the excess hours. Below are images from the power app. 

Shift CreationShift CreationShift ViewShift View

Thanks.

 

Emma.

1 ACCEPTED SOLUTION

Accepted Solutions

you could do it in power apps or have it done in the list itself so use a calculated column =IF([Hours] >40, [Hours]-40, 0)

View solution in original post

4 REPLIES 4
Crullgl
Helper I
Helper I

There is a great article on this that walks you through overtime. This should help Power Apps: Calculate Overtime - Manuel T. Gomes (manueltgomes.com)  However I would modify an IF hours are over 48 it returns error that you designate as over. You would nest it in something like this Notify(
First(Errors(Dataset)).Message, "Message here"
NotificationType.Error
))

eetigu
Frequent Visitor

@Crullgl thanks for your response. My intended solution is to keep track of the overtime hours in a separate column. For instance, if the intended shift hours + already scheduled hours is more than 48, automatically subtract the total from 48 and post it in the overtime column. However,  my formula does not work well. It is not able to accurately keep net scheduled hours to 48.

 

Thanks

you could do it in power apps or have it done in the list itself so use a calculated column =IF([Hours] >40, [Hours]-40, 0)

eetigu
Frequent Visitor

@Crullgl I implemented something similar to your solution. Thanks 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (3,247)