Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

dhavalvyas
New Contributor II

Average of Employee who retained

Hi,

I have two dates joining and termination,want to retrive Average of employee who retained..so what is expression for the same...?

I am trying this one,

avg({<Joining Month={'1','2','3','4','5'}>}EmoployeeCode) - avg({<Termination Month={'1','2','3','4','5'}>}EmoployeeCode)


But it is not working..?what is expression for the same can any one help me out...

Thanks in advanced..

7 Replies
prat1507
Valued Contributor

Re: Average of Employee who retained

Average count? what do you want exactly?


Regards

Pratyush

dhavalvyas
New Contributor II

Re: Average of Employee who retained

yes pratyush i want average of employee count who retained..

For retained my formula is wheather right or wrong..?

I am using joining month - terminated month..

Please help me out...thanks in advanced.. 

prat1507
Valued Contributor

Re: Average of Employee who retained

Can you please share a sample file plz?

You can use simple count function as :

Count({<Joining Month={'1','2','3','4','5'}>}EmoployeeCode) - Count({<Termination Month={'1','2','3','4','5'}>}EmoployeeCode)

dhavalvyas
New Contributor II

Re: Average of Employee who retained

and how to take average of above expression..?

avg(Count({<Joining Month={'1','2','3','4','5'}>}EmoployeeCode)) - avg(Count({<Termination Month={'1','2','3','4','5'}>}EmoployeeCode))


is not working...?

prat1507
Valued Contributor

Re: Average of Employee who retained

Why do you want to take average of this? can you tell me the use case plz?

prat1507
Valued Contributor

Re: Average of Employee who retained

You can get percentage of employees like :

(Count({<Joining Month={'1','2','3','4','5'}>}EmoployeeCode) - Count({<Termination Month={'1','2','3','4','5'}>}EmoployeeCode))/ (Count({<Joining Month={'1','2','3','4','5'}>}EmoployeeCode) +Count({<Termination Month={'1','2','3','4','5'}>}EmoployeeCode))


Percentage of employees who were retained, average of employees would work somewhere you have a lot of buckets like different deptts like :


tech:100

hr:20

so avg is 60.


if you have something like this, then probably you can use

(Count({<Joining Month={'1','2','3','4','5'}>}EmoployeeCode) - Count({<Termination Month={'1','2','3','4','5'}>}EmoployeeCode))/ Count(deptts)



Regards

Pratyush


dhavalvyas
New Contributor II

Re: Average of Employee who retained

How to count opening and closing count for employee...?based on Joining and Termination date..?