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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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)
User | Count |
---|---|
15 | |
11 | |
6 | |
6 | |
5 |
User | Count |
---|---|
29 | |
17 | |
11 | |
7 | |
5 |