Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Dear Community,
I need your help figuring out how to calculculate daily overtime hours.
1. Overime hours are hours exceeding 40 regular hours a week.
2. To find cumulative hours I used:
Solved! Go to Solution.
I came up with the following DAX:
Hi,
Share some data to work with and show the expected result clearly.
Thank you for your help!
Daily overtime is calculated after reaching over 40 regular hours a week
BUT there is a problem - overtime hours are shown accumulated and I need to show them per day.
This is confusing to me. Can you please elaborate?
Employees work full week (Sunday - Saturday). All hours are overtime once they reach 40 hours of regular time. So, they get usually get overtime hours on Thursdays, Fridays, Saturdays. I need to show regular and overtime hours like this:
Thanks again for helping me with this problem. I really appreciate it.
Please correct your statement for point 4.
Thanks for pointing it out. I corrected it. Thanks for your help!
Your SUMX has to go over the individual days in the filter context. To make it more obvious you can use SUMMARIZE first
SUMMARIZE (table, days, "hours worked",<hours worked>,"overtime", if <hours worked>>8, <hours worked>-8)
and then do a SUMX over <overtime>
The problem is that I cannot deduct 8 hours from total daily worked hours. Daily overtime is calculated after reaching over 40 regular hours a week. So, overtime hours would occur by the end of week only.
I came up with the following DAX:
User | Count |
---|---|
117 | |
75 | |
61 | |
50 | |
44 |
User | Count |
---|---|
175 | |
125 | |
60 | |
60 | |
58 |