Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
anirudhrao92
Contributor II
Contributor II

qliksense

Hi ,

 

i have a data of employees in a year from jan to dec so every month some of the employees gets terminated i want to count the no of employees terminated

ex:

month  terminated

jan  5

feb  4

mar 6

so when i click on feb month it should calculate feb - jan that is 4-5=-1

i tried using previous but it is not working 

how to do in qliksense

Labels (1)
5 Replies
SergeyMak
Partner Ambassador
Partner Ambassador

Hi,

Can you please share what data do you have? Just give an example.

If you have a data like

Month, NoOfEmployee

Jan2018, 6

Feb2019,5

 

and you are trying to get the number of people terminated, than you will probably get a wrong number as you should take into account that sometimes there are new people too.

e.g. if in Feb 3 were terminated, but there are 2 new, than in your way you are getting 1, but a correct answer is three...

Hope it makes sense

Regards,
Sergey
anirudhrao92
Contributor II
Contributor II
Author

hi we have already have afield called termination so we want to calculate on that field.

no new employees are joining by the way

anirudhrao92
Contributor II
Contributor II
Author

clipboard_image_0.png

anirudhrao92
Contributor II
Contributor II
Author

we have data like this for each month in different division and sub division this people are terminated as turnovercount 1 but we wantthis month minus last month
SergeyMak
Partner Ambassador
Partner Ambassador

I'd recommend you to do the calc in your load script using previous() and/or Peek() function on the ordered table by division, sub division and year-month (or date).

Try to search how to use those. It's pretty simple

Regards,
Sergey