Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
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