Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. 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:
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
90 | |
88 | |
83 | |
64 | |
49 |
User | Count |
---|---|
126 | |
110 | |
87 | |
70 | |
66 |