Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Jnkansayeboah
Contributor
Contributor

New Hire Attrition Rate

Hi,

I am trying to calculate a rolling attrition rate for people that have spent less than 3 months,  4 to 6 months, 7 to 9 months and 10 to 12 months at a company. The attrition formula I am using is; 

**The total number of leavers in certain period divided by the total number of new hires during the same period of time and then multiply the end result with 100%.**

My QlikSense calculation I am using to calculate the attrition rate for someone that stayed at the company for less than 3 months during a specific period of time is below;

num((Count({<[Bucket)]={'[0-3 Months)'}>}{<Month>}[Leaving Date]) / Count({<Month>}[Start Date])),'#0.0%')

I am not sure if this is the right  calculation. I have a table of sample data below. Could someone please advise me?

 

Unique Employee IDStart DateLeaving DateNo Of Months at CompanyBucket
124501/01/201903/03/201920-3 Months
136501/03/201931/03/201910-3 Months
689706/02/201905/09/201977-9 Months
145908/01/201904/12/20191110-12 Months
986506/07/201903/03/202087-9 Months
465705/08/201905/02/202067-9 Months
Labels (1)
5 Replies
sergio0592
Specialist III
Specialist III

Hi, maybe try with:

=num((Count({<Bucket={"0-3 Months"},Month>}[Leaving Date]) / Count({<Month>}[Start Date])),'#0.0%')
Jnkansayeboah
Contributor
Contributor
Author

Hi @sergio0592 ,

Thanks for your response!

As well as the actual code, I wanted to know whether you thought my thought process or idea for calculating rolling attrition was right? 

Thanks,

Jed

Saravanan_Desingh
MVP
MVP

One solution is.

SET DateFormat='DD/MM/YYYY';

SET MonthDiff = Num(((year($2) * 12) + month($2)) - (((year($1) * 12) + month($1))) + 1);

tab1:
LOAD *, Class([No Of Months at Company],3,'months') As Bucket
;
LOAD *, $(MonthDiff([Start Date],[Leaving Date])) As [No Of Months at Company]
;
LOAD * INLINE [
    Unique Employee ID, Start Date, Leaving Date
    1245, 1/1/2019, 3/3/2019
    1365, 1/3/2019, 31/03/2019
    6897, 6/2/2019, 5/9/2019
    1459, 8/1/2019, 4/12/2019
    9865, 6/7/2019, 3/3/2020
    4657, 5/8/2019, 5/2/2020
];
Saravanan_Desingh
MVP
MVP

commQV18.PNG

Jnkansayeboah
Contributor
Contributor
Author

Hi @Saravanan_Desingh ,

Thanks for your response. However I was looking more to see if my code for calculating rolling attrition was right.