Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I need to transfer this calculation into a table as the dashboard has become too slow:
Overtime =
VAR currentEmpID = MAX ( 'Timesheet Data'[Employee ID])
VAR currentLDW = MAX ( 'Timesheet Data'[last_day_of_week])
VAR currentContractHours = MAX ( 'Timesheet Data'[Work_Week_Hours] )
VAR OT =
CALCULATE (
SUM ( 'Timesheet Data'[Hours] ),
FILTER (
ALL ( 'Timesheet Data'[Employee ID], 'Timesheet Data'[last_day_of_week] ),
'Timesheet Data'[Employee ID] = currentEmpID
&& 'Timesheet Data'[last_day_of_week] = currentLDW
)
) - currentContractHours
RETURN OT
THe way I planned to do it is to place the 3 VAr statements into a table:
VAR currentEmpID = MAX ( 'Timesheet Data'[Employee ID])
VAR currentLDW = MAX ( 'Timesheet Data'[last_day_of_week])
VAR currentContractHours = MAX ( 'Timesheet Data'[Work_Week_Hours] )
--------------------------------------------------------
And I am trying this:
Hi amitchandax, Work_Week_Hours is decimal type. maybe create diferent tables for the MAX values and the SUM I hear you say?
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 5 | |
| 5 | |
| 4 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 24 | |
| 21 | |
| 13 | |
| 12 | |
| 10 |