Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
DAX is not exact here (actual data much messier) but example as follows:
Goal: get subtotal of overtime hours by employee AND dept as of as of 5/2/17 (assume DATA1 ends here)
Data sets:
Data1: actual hours by employee by day
REF1: working days list by date
REF2: employee standard working hours per day
Calculated Measures
FTE% = IFERROR( REF2[STD_HRS]/8,0)
REGHRS = REF1[WORKDAY] * 8 * [FTE%]
OT HRS = IF( CALCULATE(SUM(DATA1[HOURS]) - [REGHRS]>0, CALCULATE(SUM(DATA1[HOURS])-[REGHRS], 0)
Result: Subtotals/grand totals for OT hrs are calculating based on subtotals, need sum of above.
Any help on how to change the OT Hrs measure to correctly get subtotals is appreciated
Solved! Go to Solution.
The standard technique for "my subtotals are wrong" is "wrap it in a sumx".
Total OT=SUMX(Employees, [OT Hrs])
Since [OT Hrs] is correct on a per employee basis, you can just walk all employeeds adding up their OT Hrs...
The standard technique for "my subtotals are wrong" is "wrap it in a sumx".
Total OT=SUMX(Employees, [OT Hrs])
Since [OT Hrs] is correct on a per employee basis, you can just walk all employeeds adding up their OT Hrs...
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
94 | |
77 | |
65 | |
53 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |