Forum Discussion
HR Attrition Rate DAX
Hello Folks ,
Hope you all are doing well .
I have been stucked from past 3 days , I need to calculate the HR Attrition and Attrition percentage based on the data .
here is the below data like
UserID, Name , Date of joinig , department .............Here i should have to find two columns .... Present in last month .. Present in currrent month ............
Please check and let me know .
Regards,
Raman
5 Replies
- 123abc
Community Champion
First Calculate the Number of Employees Present in the Last Month:
Employees_Last_Month = CALCULATE( COUNTROWS('EmployeeTable'), FILTER( 'EmployeeTable', 'EmployeeTable'[Date of Joining] <= EOMONTH(TODAY(), -1) && (ISBLANK('EmployeeTable'[Termination Date]) || 'EmployeeTable'[Termination Date] > EOMONTH(TODAY(), -1)) ) )Second Calculate the Number of Employees Present in the Current Month:
Employees_Current_Month = CALCULATE( COUNTROWS('EmployeeTable'), FILTER( 'EmployeeTable', 'EmployeeTable'[Date of Joining] <= EOMONTH(TODAY(), 0) && (ISBLANK('EmployeeTable'[Termination Date]) || 'EmployeeTable'[Termination Date] > EOMONTH(TODAY(), 0)) ) )Third Calculate the Attrition Rate:
Attrition_Rate = DIVIDE( CALCULATE( COUNTROWS('EmployeeTable'), FILTER( 'EmployeeTable', 'EmployeeTable'[Termination Date] >= EOMONTH(TODAY(), -1) && 'EmployeeTable'[Termination Date] <= EOMONTH(TODAY(), 0) ) ), Employees_Last_Month, 0 )Final Calculate the Attrition Percentage:
Attrition_Percentage = [Attrition_Rate] * 100
These measures should help you calculate the HR Attrition Rate and Attrition Percentage based on your data. If you need further assistance or have any questions, feel free to ask! 😊
Also Follow Given Link:
Calculating Employee Attrition Rate with DAX – Part 1
Solved: Attrition DAX for HR Dashboard - Microsoft Fabric Community
Calculating Staff Turnover with DAX in Power BI | HR Insight...
Furthermore :
You can also share your sample pbix file with non senstive data for more help.
- ryan_mayu
Super User
what's the expected output based on the sample data you provided?