Forum Discussion
Overtime Report Help
- 2 years ago
AppleMan ,
Various ways this can be done. I have attached an updated pbix that shows one of these ways.
Import your Holiday Table. Connect it to your Date Table. It should be 1-1 relationship.
Then I created a Calculated Column in your Date Table using SWITCH and LOOKUPVALUE.
I structured it to give you 0's and 1's, but you can replace these with other values if you so choose ("Holiday" or "Work Day").
Let me know if you run into any issues....
Regards and Good Luck
AppleMan ,
Yes please close this thread. Continue to poke away. You caught me at a good time, because I have just published an Employee Time Report for my company.
Best Regards,
Hi!
Happy Friday!
I need help with hopefully one last thing. My OT is calculating exactly how I want, except for employees who work the "weekend" shift where OT is calculated daily when they go over 8 hours. It works fine for a single employee however I am testing out my measure to make sure it works for multiple employees and running into an issue.
This is what runs my OT calculation. If you look in the _OvertimeWeekend variable, youll notice that it multiplies the end part by 3. This is just temporary since the weekend overtime employee im testing with had "weekend" shifts in 3 days, or to be more clear he worked on 3 seperate days where on each day if he had more than 8 hours summed it was considered overtime.
I am trying to think of a good way to have this measure accomplish what I want and I have not been able to. I will give you an example:
| Jim | 1/28 | 11.05 | Weekend |
| Jim | 2/2 | 8.65 | Weekend |
| JIm | 2/3 | 5.08 | Weekend |
| Bob | 1/29 | 7.5 | Weekend |
| Bob | 1/29 | 1.5 | Weekend |
In this example, I would need that _OvertimeWeekend variable to return for Jim, (11.05 - 8 = 3.05) + (8.65 - 8 = .65) = 3.7 for overtime hours. For Bob, return (7.5 + 1.5) - 8 = 1 hours for overtime. If I had a card showing the total for this week range it would return 4.7 hours overtime.
The issue I am running into in my measure is dynamically getting that 3 I mentioned before to instead change to the number of days someone has hours, which works perfect for Jim, but would also throw Bobs overtime hours off since his would multiply by 3 and he worked only a single day. If I can figure out how to get these weekend, or shift 41 as you can see in my measure, workers overtime to calculate correctly then the rest of this report should go smoothly.
If you see any flaws with how im calculating this in general I am happy to take critism.
I appreciate any help, thank you!