Forum Discussion
Anonymous
5 years agoNot applicable
Hiring, termination, Active Headcount based on historical data
Hi, I am looking for a DAX measure to calculate above measures based on historical staff data at any period in time. Below is the sample of how data looks like. id start_date end_date 1 ...
Anonymous
5 years agoNot applicable
Jihwan_KimThanks, I tried modifying the formula to this giving active employee at any point in time based on date filter:
Active Headcount =
CALCULATE (
DISTINCTCOUNT ( Data[id] ),
FILTER (
Data,
OR ( Data[end_date] >= MIN ( Dates[Date] ), Data[end_date] = BLANK () )
&& Data[start_date] <= MAX ( Dates[Date] )
), REMOVEFILTERS(Dates)
)
Jihwan_Kim
Super User
5 years agoHi, Anonymous
Sorry, I am not sure whether your response is a question.
- Anonymous5 years agoNot applicable
Jihwan_Kim Also, if you could assist with the logic behind calculating hire & termination count . The situation looks like for event in progress scenario. Many thanks.