Forum Discussion
jdevries192
3 years agoFrequent Visitor
DAX: Calculate Hires and Terminations
Hi All, Looking to calculate with DAX new hire retention in a given month based on an activity table. Issue is an employee may be hired and terminated many times (see employee 1 in example below)...
amitchandak
Super User
3 years agojdevries192 , With help from date table joined to your date of the table
Active Employees = calculate(distinctCOUNT(EmpData[ID]) , filter(EmpData, EmpData[Date] <= max(Date[Date]) && [Activity] = "Hire" ))
- calculate(distinctCOUNT(EmpData[ID]) , filter(EmpData, EmpData[Date] <= max(Date[Date]) && [Activity] = "Termination" ))
jdevries192
3 years agoFrequent Visitor
You are counting all hires and terminations.
I need those who are still active at the start of February (who have been hired but not terminated). And I need those who were active at the start of February and who are still active at the end of February.