# 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
Did you mean:
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...

7 Replies
Specialist

Average count? what do you want exactly?

Regards

Pratyush

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

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)

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...?

Specialist

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

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

Contributor III
Author

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

Tags
Community Browser