This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hi All,
I know there are already a lot of posts on this topic, but I have scoured them all and can't seem to get this to work.
I need to be able to determine overtime hours per week per employee, as well as overtime hours for groups as a whole, and then eventuall use that to calculate overtime costs.
I can successfully calculate Overtime Hours with this measure, but it only works in a table where I am looking at employees by weeks. if i look at more than 1 employee or more than 1 week I run into a sum total issue.
This measure appears to have be calculating the sum total, but for normal hours and overtime hours, it also doesnt display the hours per employee for some reason.
Solved! Go to Solution.
Hi,
I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
Work Hours: =
SUM( work_hours[work_hours] )
Overtime Hours: =
VAR _t =
ADDCOLUMNS (
SUMMARIZE ( work_hours, 'calendar'[Start of Week], employee[name] ),
"@overtime",
IF ( [Work Hours:] > 40, [Work Hours:] - 40, 0 )
)
RETURN
SUMX ( _t, [@overtime] )
Overtime Pay: =
VAR _t =
ADDCOLUMNS (
SUMMARIZE ( work_hours, 'calendar'[Start of Week], employee[name], employee[overtime_rate] ),
"@overtimepay",
IF ( [Work Hours:] > 40, [Work Hours:] - 40, 0 ) * employee[overtime_rate]
)
RETURN
SUMX(_t, [@overtimepay])
Hi,
I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
Work Hours: =
SUM( work_hours[work_hours] )
Overtime Hours: =
VAR _t =
ADDCOLUMNS (
SUMMARIZE ( work_hours, 'calendar'[Start of Week], employee[name] ),
"@overtime",
IF ( [Work Hours:] > 40, [Work Hours:] - 40, 0 )
)
RETURN
SUMX ( _t, [@overtime] )
Overtime Pay: =
VAR _t =
ADDCOLUMNS (
SUMMARIZE ( work_hours, 'calendar'[Start of Week], employee[name], employee[overtime_rate] ),
"@overtimepay",
IF ( [Work Hours:] > 40, [Work Hours:] - 40, 0 ) * employee[overtime_rate]
)
RETURN
SUMX(_t, [@overtimepay])
Absolutely awesome, thank you so much!!!!
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 27 | |
| 25 | |
| 23 | |
| 19 | |
| 14 |
| User | Count |
|---|---|
| 50 | |
| 45 | |
| 20 | |
| 18 | |
| 18 |