Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
daveesjohn
Contributor II
Contributor II

Running headcount per month year

Hi,

I want to create a chart that shows the as of / running total headcount of employees based on their hiring date, and exclude resigned employees.
assuming I have a sample data below:

EMP_ID DATE_HIRED DATE_RESIGNED
212 01/03/2022
213 01/03/2022
214 02/04/2022
215 02/04/2022 03/01/2022
216 03/04/2022
217 03/05/2022
218 03/05/2022 04/02/2022
219 04/05/2022
220 04/05/2022

the result should be

MONTH_DATE HEAD_COUNT
JAN 2022 2
FEB 2022 4
MAR 2022 6
APR 2022 7

Thank you

Labels (1)
3 Replies
MayilVahanan

HI

Try like below

Exp: Rangesum(Above(Count(DISTINCT EMP_ID), 0, RowNo(Total)))

MayilVahanan_0-1668485026171.png

 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
daveesjohn
Contributor II
Contributor II
Author

Hi @MayilVahanan 

Thanks for your feedback, it's working, but I forgot what If we have additional field such as "DATE_RESIGNED" wherein we only need to count the Active employees as of the current running date and year