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
Hi Anonymous ,
Here are the steps you can follow:
1. Create a calendar table.
2. Create measure.
Measure =
var _select=SELECTEDVALUE('Date'[Date])
var _table=SELECTCOLUMNS('Table (2)',"start",[start_date],"end",IF([end_date]=BLANK(),TODAY(),[end_date]))
return
COUNTX(FILTER(_table,[start]<=_select&&[end]>=_select),[start])
3. Result.
What do you mean by "assisted with the logic behind calculating hire & termination count" is not very clear, is it a new field, can you describe it?
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.