Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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)
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
24 | |
10 | |
6 | |
6 | |
6 |
User | Count |
---|---|
29 | |
11 | |
11 | |
10 | |
6 |