New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
New Contributor II

Active employee count for specific year

Hello,

I have count of people who are starting and who are terminating year wise. I want the active employee count as per the year if I select year from filter pane. Please find attached image for more information.

Tags (3)
1 Solution

Accepted Solutions
MVP

Re: Active employee count for specific year

We are not looking for your actual data my friend.... we are looking for a representative data which is close to your actual data. I already provided one solution based on what you shared... I am going to provide another... but if that doesn't work... I am afraid I am not going to attempt again unless you provide a sample which is more inline with your actual data

Count(DISTINCT {<Year = {"\$(='<=' & Max(Year))"}, Attribute = {'StartYear'}>}[EMP ID]) -

Count(DISTINCT {<Year = {"\$(='<=' & Max(Year))"}, Attribute = {'Terminate Year'}>}[EMP ID])

15 Replies
MVP

Re: Active employee count for specific year

How are you getting 5 for 2002? Total Started is 2 + 3 = 5 and 1 guy left.... Should it be 4? If it is 5, can you explain the logic?

Contributor III

Re: Active employee count for specific year

Use Set Analysis,

Try the below expression,

Count({<Year={2002}>}Distinct Employee)

If u want to see all the separate year listed,

Count({<Year={\$(=Max(Year))>}Distinct Employee)

Esteemed Contributor II

Re: Active employee count for specific year

Is this the exact representation of the dataset you are working with? I don't think so

Can you provide a sample

New Contributor II

Re: Active employee count for specific year

yes you correct sorry for that it should be 4

MVP

Re: Active employee count for specific year

May be like this:

Sum({<Year = {"\$(='<=' & Max(Year))"}>}[Employee Who Started]) -

Sum({<Year = {"\$(='<=' & Max(Year))"}>}[Employee Who Terminated])

MVP

Re: Active employee count for specific year

or this:

Sum({<Year = {"\$(='<=' & Max(Year))"}>} RangeSum([Employee Who Started] - [Employee Who Terminated]))

New Contributor II

Re: Active employee count for specific year

This is how dataset looks like.

New Contributor II

Re: Active employee count for specific year

This is how dataset looks like.

New Contributor II

Re: Active employee count for specific year

This is how dataset looks like.

Community Browser