Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I have a timesheet export that contains columns with the date, acitivity and hours worked:
I wrote the following DAX GroupBy formula to group hours per day, which gives the desired result of total hours per date:
I want to add a line to this that calculates the amount of overtime based on an 8 hours day:
DateHours =
)
This however gives me an error:
"Function 'GROUPBY' scalar expressions have to be Aggregation functions over CurrentGroup(). The expression of each Aggregation has to be either a constant or directly reference the columns in CurrentGroup()."
My question is how do I add a SUMX plus constant value and calculation in this calulated table to get the overtime hours worked per date?
Solved! Go to Solution.
@Anonymous , You can create a new column
Overtime = Sheet1[Hours])-8
or new measure and use that in visual
"Overtime", SUMX(values(Sheet[Date]), Sheet1[Hours])-8)
Thanks, creating a new column worked!
@Anonymous , You can create a new column
Overtime = Sheet1[Hours])-8
or new measure and use that in visual
"Overtime", SUMX(values(Sheet[Date]), Sheet1[Hours])-8)
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.