Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.
Hi, Community,
Kindly help with HR Attrition Calculation monthwise for the data below. Attrition Table required in the below format.
Month | Closing | Regretted | Employment Details Separation Date | Month | Cumulative Months & Days | Average HC | Overall Annualised Attrition% | OverAll Regretted Annualised Regret% |
Opening HC | 795 | |||||||
Closing of Active Head Count | Monthly Regretted Count | Monthly Terminated Count | Month Count | Cumulative Months & Days | Average Active HC(Opening Count is fixed and adding monthwise Active HC) | (Total Terminated Count/Avg Count)/Cumulative of Month*365 | (Total Regretted Count/Avg Count)/Cumulative of Month*365 |
Data
EMP ID | Employee Name | Employee Status | Status Remarks | Date of Joining Current Company | Gender | Diversity | Function Name | Employee Level | Employee Salary Grade | Type | Employment Details Separation Date | Hi-Per/Hi-Pot | Retention Status |
1526 | Emp1526 | Active | Active | 01-Apr-24 | Male | Male | Operations | Level 1 | Senior Executive | ||||
1527 | Emp1527 | Active | Active | 01-Apr-24 | Male | Male | Marketing & Sales | Level 3 | Senior General Manager | ||||
1528 | Emp1528 | Active | Active | 01-Apr-24 | Male | Male | Operations | Level 1 | Senior Executive | ||||
1529 | Emp1529 | Active | Active | 01-Apr-24 | Male | Male | Marketing & Sales | Level 1 | Deputy Manager | ||||
1530 | Emp1530 | Terminated | Terminated | 01-Apr-24 | Male | Male | Legal & Secretarial | Level 3 | General Manager | Non-Regretted | 24-01-2025 | Non - Hiper/Hipot | Not Retained |
1531 | Emp1531 | Terminated | Terminated | 01-Apr-24 | Male | Male | Operations | Level 1 | Senior Executive | Regretted | 14-07-2024 | Non - Hiper/Hipot | Not Retained |
1532 | Emp1532 | Active | Active | 03-Apr-24 | Female | Female | Marketing & Sales | Level 1 | Senior Executive | ||||
1533 | Emp1533 | Active | Active | 08-Apr-24 | Female | Female | Marketing & Sales | Level 1 | Senior Executive | ||||
1534 | Emp1534 | Active | Active | 08-Apr-24 | Male | PWD | Operations | Level 1 | Deputy Manager | Regretted | Non - Hiper/Hipot | Retained | |
1535 | Emp1535 | Active | Active | 10-Apr-24 | Male | Male | Finance & Accounts | Level 1 | Executive | ||||
1536 | Emp1536 | Active | Active | 10-Apr-24 | Male | Male | Operations | Level 2 | Senior Manager | ||||
1537 | Emp1537 | Active | Active | 15-Apr-24 | Male | Male | Marketing & Sales | Level 1 | Executive | ||||
1538 | Emp1538 | Active | Active | 15-Apr-24 | Female | Female | Customer Centricity | Level 1 | Executive | ||||
1539 | Emp1539 | Active | Active | 22-Apr-24 | Female | Female | Operations | Level 1 | Assistant Manager | ||||
1540 | Emp1540 | Active | Active | 22-Apr-24 | Male | Male | Operations | Level 1 | Senior Executive | ||||
1541 | Emp1541 | Active | Active | 24-Apr-24 | Male | Male | Operations | Level 1 | Deputy Manager | ||||
1542 | Emp1542 | Active | Active | 29-Apr-24 | Female | Female | Marketing & Sales | Level 1 | Senior Executive | ||||
1543 | Emp1543 | Active | Active | 02-May-24 | Male | Male | Marketing & Sales | Level 1 | Senior Executive | ||||
1544 | Emp1544 | Active | Active | 06-May-24 | Female | Female | Operations | Level 1 | Senior Executive | ||||
1545 | Emp1545 | Active | Active | 06-May-24 | Male | Male | Operations | Level 1 | Assistant Manager | ||||
1546 | Emp1546 | Active | Active | 06-May-24 | Female | Female | Operations | Level 1 | Assistant Manager | ||||
1547 | Emp1547 | Terminated | Terminated | 08-May-24 | Female | Female | Customer Centricity | Level 1 | Senior Executive | Non-Regretted | 12-05-2024 | Non - Hiper/Hipot | Not Retained |
1548 | Emp1548 | Active | Notice Period | 13-May-24 | Female | Female | Marketing & Sales | Level 1 | Senior Executive | Regretted | 15-03-2025 | Non - Hiper/Hipot | Retained |
1549 | Emp1549 | Active | Active | 13-May-24 | Male | Male | Operations | Level 1 | Senior Executive | ||||
1550 | Emp1550 | Active | Active | 20-May-24 | Female | Female | Customer Centricity | Level 1 | Executive | ||||
1551 | Emp1551 | Active | Active | 20-May-24 | Male | Male | Operations | Level 1 | Senior Executive | ||||
1552 | Emp1552 | Active | Active | 20-May-24 | Male | Male | Marketing & Sales | Level 1 | Assistant Manager | ||||
1553 | Emp1553 | Active | Active | 22-May-24 | Male | Male | Operations | Level 2 | Senior Manager | ||||
1554 | Emp1554 | Active | Active | 27-May-24 | Female | Female | Finance & Accounts | Level 1 | Assistant Manager | ||||
1555 | Emp1555 | Active | Active | 29-May-24 | Female | Female | Customer Centricity | Level 1 | Executive | ||||
1556 | Emp1556 | Active | Active | 03-Jun-24 | Male | LGBTQ | Customer Centricity | Level 1 | Senior Executive | ||||
1557 | Emp1557 | Active | Active | 03-Jun-24 | Female | Female | Gallopers | Level 2 | Manager | ||||
1558 | Emp1558 | Terminated | Terminated | 05-Jun-24 | Female | Female | Customer Centricity | Level 2 | Senior Manager | Regretted | 28-10-2024 | Non - Hiper/Hipot | Not Retained |
1559 | Emp1559 | Active | Active | 05-Jun-24 | Female | Female | Customer Centricity | Level 1 | Senior Executive | ||||
1560 | Emp1560 | Active | Active | 05-Jun-24 | Female | Female | Customer Centricity | Level 1 | Senior Executive |
Hi @Abhi1306 , I went through the thread and it would be better if you could attach the .pbix file.
I know you have asked us to do this with given data. But why you are not getting desired result can be due to data modelling issue or other issue which can only be checked if you share the file.
Hi @Abhi1306 , Please let us know if your issue is solved. If it is, consider marking the answer that helped 'Accept as Solution', so others with similar queries can find it easily. If not, please share the details.
Thank you.
Hi @Abhi1306 , Thank you for reaching out to the Microsoft Community Forum.
Please let us know if your issue is solved. If it is, consider marking the answers that helped 'Accept as Solution', so others with similar queries can find them easily. If not, please share the details.
Thank you.
Hey,
Thank you for response,
With reference to below, I have not recevied the result as required,
Can you please confirm if you @Abhi1306 is the same as @Abhi130681 . Also you can add .pbix files by clicking on the 'browse' button. Refer below screensho.
I am not able to get desired result, I want monthwise Attrition Precentage, and below is calculation formate :
Month | Closing | Regretted | Employment Details Separation Date | Month | Cumulative Months & Days | Average HC | Overall Annualised Attrition% | OverAll Regretted Annualised Regret% |
Opening HC | 795 | |||||||
Closing of Active Head Count | Monthly Regretted Count | Monthly Terminated Count | Month Count | Cumulative Months & Days | Average Active HC(Opening Count is fixed and adding monthwise Active HC) | (Total Terminated Count/Avg Count)/Cumulative of Month*365 | (Total Regretted Count/Avg Count)/Cumulative of Month*365 |
how do I attached .pbix file
Hi @Abhi1306 ,
The HR attrition calculation is now fully dynamic, relying entirely on the EmployeeData table without any hardcoded values. The Opening HC is determined for each month by counting employees who joined on or before the start of the month and who have not yet left. The Closing HC is calculated in a similar manner but considers the end of the month instead. Monthly terminations are determined by counting employees whose Separation Date falls within the given month. Additionally, regretted terminations are filtered by checking the Regretted flag. The cumulative months are tracked dynamically based on the earliest recorded month in the dataset, ensuring an accurate timeline for attrition calculations. The average headcount is computed as the midpoint between the opening and closing counts. Finally, the overall annualized attrition rate and regretted attrition rate are derived using the total terminations and average headcount, scaled to a yearly basis.
Opening HC =
VAR FirstMonth = SELECTEDVALUE('Calendar'[Date])
RETURN
CALCULATE(
COUNT('EmployeeData'[Employee ID]),
'EmployeeData'[Date of Joining Current Company] <= FirstMonth &&
(ISBLANK('EmployeeData'[Separation Date]) || 'EmployeeData'[Separation Date] > FirstMonth)
)
Closing HC =
VAR SelectedMonth = SELECTEDVALUE('Calendar'[Date])
RETURN
CALCULATE(
COUNT('EmployeeData'[Employee ID]),
'EmployeeData'[Date of Joining Current Company] <= EOMONTH(SelectedMonth, 0) &&
(ISBLANK('EmployeeData'[Separation Date]) || 'EmployeeData'[Separation Date] > EOMONTH(SelectedMonth, 0))
)
Monthly Terminations =
CALCULATE(
COUNT('EmployeeData'[Employee ID]),
NOT(ISBLANK('EmployeeData'[Separation Date])) &&
'EmployeeData'[Separation Date] >= STARTOFMONTH('Calendar'[Date]) &&
'EmployeeData'[Separation Date] <= ENDOFMONTH('Calendar'[Date])
)
Monthly Regretted Terminations =
CALCULATE(
COUNT('EmployeeData'[Employee ID]),
NOT(ISBLANK('EmployeeData'[Separation Date])) &&
'EmployeeData'[Separation Date] >= STARTOFMONTH('Calendar'[Date]) &&
'EmployeeData'[Separation Date] <= ENDOFMONTH('Calendar'[Date]) &&
'EmployeeData'[Regretted] = TRUE()
)
Cumulative Months =
VAR CurrentMonth = SELECTEDVALUE('Calendar'[Date])
RETURN
DATEDIFF(MIN('Calendar'[Date]), CurrentMonth, MONTH) + 1
Average HC =
VAR OpenHC = [Opening HC]
VAR CloseHC = [Closing HC]
RETURN
(OpenHC + CloseHC) / 2
Overall Annualised Attrition% =
VAR TotalTerminations = CALCULATE(SUMX(VALUES('Calendar'[Date]), [Monthly Terminations]))
VAR AvgHC = [Average HC]
VAR CumulativeMonths = [Cumulative Months]
RETURN
IF(CumulativeMonths = 0, BLANK(), (TotalTerminations / AvgHC) / CumulativeMonths * 365)
Overall Regretted Annualised Attrition% =
VAR TotalRegretted = CALCULATE(SUMX(VALUES('Calendar'[Date]), [Monthly Regretted Terminations]))
VAR AvgHC = [Average HC]
VAR CumulativeMonths = [Cumulative Months]
RETURN
IF(CumulativeMonths = 0, BLANK(), (TotalRegretted / AvgHC) / CumulativeMonths * 365)
With this approach, the calculations dynamically adjust based on employee data, making them scalable and adaptable to any changes in headcount. The Opening HC and Closing HC update automatically each month based on hires and separations, ensuring that attrition is measured accurately. Using && ensures that multiple conditions are applied correctly, filtering employees based on both their Joining Date and Separation Date where applicable. This setup provides HR with a clear, data-driven view of workforce changes over time. Let me know if you need any further refinements.
Best regards,
Data Preparation: Ensure your data is clean and properly formatted. You may need to create additional columns for month and year based on the Employment Details Separation Date.
Create Calculated Columns:
Month: Extract the month from the Employment Details Separation Date.
Year: Extract the year from the Employment Details Separation Date.
And create measures as
DAX
OpeningHC = 795
ClosingHC =
CALCULATE(
COUNTROWS('Table'),
'Table'[Employee Status] = "Active"
)
MonthlyRegrettedCount =
CALCULATE(
COUNTROWS('Table'),
'Table'[Status Remarks] = "Regretted",
'Table'[Employee Status] = "Terminated"
)
MonthlyTerminatedCount =
CALCULATE(
COUNTROWS('Table'),
'Table'[Employee Status] = "Terminated"
)
AverageActiveHC =
AVERAGEX(
VALUES('Table'[Month]),
CALCULATE(COUNTROWS('Table'), 'Table'[Employee Status] = "Active")
)
OverallAnnualisedAttrition =
DIVIDE(
[MonthlyTerminatedCount],
[AverageActiveHC]
) * 365 / [CumulativeMonths]
OverallRegrettedAnnualisedRegret =
DIVIDE(
[MonthlyRegrettedCount],
[AverageActiveHC]
) * 365 / [CumulativeMonths]
Proud to be a Super User! |
|
Check out the May 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
72 | |
67 | |
65 | |
43 | |
42 |
User | Count |
---|---|
47 | |
38 | |
28 | |
28 | |
27 |