Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
dhavalvyas
Contributor III
Contributor III

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
Specialist
Specialist

Average count? what do you want exactly?


Regards

Pratyush

dhavalvyas
Contributor III
Contributor III
Author

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
Specialist
Specialist

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
Contributor III
Contributor III
Author

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
Specialist
Specialist

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

prat1507
Specialist
Specialist

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
Contributor III
Contributor III
Author

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