Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
rdkr_2023
Frequent Visitor

Start of employee count for HR attrition

Hello,

I m trying to create attrition rate formula and want to get start count per month, and end count.

For given sample data, for Feb 2021 will the start count be 0 and then end count as 4 ? 

for march will start count be 4 and end count be 6 ?

if yes can you help how to write the  DAX formula ? if not can u explain whats the correct start and end count ?

I also need to be able to bucket this based on department.

Like

 

Finance - Feb - start count = 0, End count = 3

Sales - Feb start count = 0, End count = 1

Finance - March - start count = 3, End count = 4

Sales - Feb start count = 1, End count = 2

I have a Dates table and a table that has employee details.. 

Say my sample data is as below

emp code - emp name - date of joining - date of relieving - department

1000-xxx-Feb 22 2021 - blank - finance

2000-yyy-Feb 24 2021 - blank - Sales

3000-mmm-Feb 25 2021 - blank - finance

4000-ggg-Feb 26 2021 - blank - finance

5000-hhh-March 03 2021 - blank - sales

6000-ppp-March 14 2021 - blank - finance

 

thank you so much for the help

 

3 REPLIES 3
amitchandak
Super User
Super User

@rdkr_2023 , DO you have start and end date, if yes these can help

Power BI: HR Analytics - Employees as on Date : https://youtu.be/e6Y-l_JtCq4
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

 

Or the attached file

and one more Q to add.. how shud I write the formula for attrition using your measures if its to be calculated as 

= Leavers / (average num of employees ) which in other words is

= Leavers / (Start emp count for that row / end emp count for that row)/2

Pls note I mention row as that can be just based on month/year , or month year and department or just department .

Thanks Amit, that was somewhat helpful but i am still finding it difficult to understand how to reset my starting count if I want to show the current empl , hired, terminated etc per department. When I look at the full compan level , this looks good.

 

Can you try adding a column called "Department" to your excel and enter some dummy departments like Finance, Sales etc and then upate the PBIX and show how will I see below

 

Department - Month/year - Current employees - Hired - Terminated 

Finance    -  April 2021   - XX - Y - ZZ

Finance   - May 2021 - XG - JJ - PP

 

and does Employee change % formula need any change ?

thank you very much

Sales - June 2021 - KK - LL _DD

 

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors