Forum Discussion
Anonymous
4 years agoNot applicable
Filtering a measure
Hi All, I have a measure which calculates the 12 month rolling headcount from an employee file. Measure as below. However, i need it to exclude certain "Contract Types" so i have a field call...
- 4 years ago
Hi Anonymous ,
You can try like this:-
Rolling 12 month HC = CALCULATE ( COUNT ( 'HC'[Employee ID] ), DATESINPERIOD ( 'Date'[Date], MAX ( 'Date'[Date] ), -12, MONTH ), FILTER ( 'table', table[Contract Type] IN { "Perm", "Fix" } && table[Contract Type] <> Agency ) )Thanks,
Samarth
Samarth_18
4 years agoCommunity Champion
Hi Anonymous ,
You can try like this:-
Rolling 12 month HC =
CALCULATE (
COUNT ( 'HC'[Employee ID] ),
DATESINPERIOD ( 'Date'[Date], MAX ( 'Date'[Date] ), -12, MONTH ),
FILTER (
'table',
table[Contract Type]
IN { "Perm", "Fix" }
&& table[Contract Type] <> Agency
)
)
Thanks,
Samarth