Forum Discussion
Anonymous
5 years agoNot applicable
Measure Overtime Hours, two categories
Hi all, See my sample file here. I'm trying to calculate the "Normal Hours", Overtime Category 1 Hours" and "Overtime Category 2 Hours" out of my fact table which contains "Hours per day". ...
- 5 years ago
I see... Ok, try:
Overtime Hours = [Total Hours] - 8Cat 1 Overtime = SUMX ( ADDCOLUMNS ( SUMMARIZE ( FILTER ( Urenregistratie, [Overtime Hours] > 0 ), Kalender[Date], Personeel[Uitzendkracht] ), "Cat 1", IF ( [Overtime Hours] > 2, 2, [Overtime Hours] ) ), [Cat 1] )Cat 2 Overtime = SUMX ( ADDCOLUMNS ( SUMMARIZE ( FILTER ( Urenregistratie, [Overtime Hours] > 2 ), Kalender[Date], Personeel[Uitzendkracht] ), "Cat 2", [Overtime Hours] - [Cat 1 Overtime] ), [Cat 2] )To get:
PaulDBrown
Community Champion
5 years agoTry:
Overtime Hours = [Total Hours] - 8
And then:
Cat 1 Overtime =
SUMX (
ADDCOLUMNS (
SUMMARIZE (
FILTER ( Urenregistratie, [Overtime Hours] > 2 ),
Kalender[Date],
Personeel[Uitzendkracht]
),
"Cat 1", [Overtime Hours]
),
[Cat 1]
)
Cat 2 Overtime =
SUMX (
ADDCOLUMNS (
SUMMARIZE (
FILTER ( Urenregistratie, [Overtime Hours] >= 1 && [Overtime Hours] < 3 ),
Kalender[Date],
Personeel[Uitzendkracht]
),
"Cat 2", [Overtime Hours]
),
[Cat 2]
)
and you will get this: