Forum Discussion
Calculating work hours
- Jun 27, 2023
Broly123 you can't do it that way because a calculated column can only look at the columns in the same item, not across different items. It would be best to have the Punch In and Punch Out columns in the same item. As you've mentioned Power Apps, you could do the calculation in Power Apps then patch the hours to an item in the SharePoint list.
Rob
Los Gallardos
Broly123 you can't do it that way because a calculated column can only look at the columns in the same item, not across different items. It would be best to have the Punch In and Punch Out columns in the same item. As you've mentioned Power Apps, you could do the calculation in Power Apps then patch the hours to an item in the SharePoint list.
Rob
Los Gallardos
- Broly123Jun 29, 2023Copper Contributor
Rob_Elliott Thanks for the reply! I went ahead and changed it. I seem to have a problem with my formula for total worked hours that day with a 30 min lunch break. And how would I calculate for total hrs that week?
- Rob_ElliottJun 29, 2023Bronze Contributor
Broly123 your endtime is empty which is why you have the problem.To calculate the hours for the week you'd either need columns for each day of the week (because a calcaulated column can only look at the same item, not across different items) or you'd need a flow in Power Automate.
- Broly123Jun 29, 2023Copper Contributor
Rob_Elliott Noted. I'm still getting a negative value. Is that the correct formula I'm using? and is there a tutorial on using Power Automate to calculate the hrs for the week?