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 moreShape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.
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:
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Check out the November 2024 Power BI update to learn about new features.
User | Count |
---|---|
94 | |
90 | |
83 | |
76 | |
49 |
User | Count |
---|---|
145 | |
140 | |
109 | |
68 | |
55 |