Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Nagaraju_KCS
Specialist III
Specialist III

Need Help??

Hi All,

I have to calculate how many years working, i am using AGE function.

like Age(DOJ, Resignation_Date)

Sample Example..

this is my table i want to exclude 0-3 months Experience.. persons

i want to calculate only 4 moths to upper experence....


EmpName  DOJ           Resignation Date

Raju16/10/201310/02/2014
sunil06/02/201207/03/2012
sampath17/11/201417/11/2014
reddy14/09/200918/10/2012
amith12/03/201401/08/2014
sandya19/04/201027/11/2012
Apporv25/08/201429/08/2014
Sameer03/10/201126/04/2013
Akil12/01/200926/07/2012
Nitya13/12/201027/05/2013
Satya03/08/200915/05/2013
Viktanth07/07/201122/10/2013
santu20/01/201403/11/2014
banti23/04/200923/04/2012

Hope you Undersatand .......!!!!

Thanks in Advance......

Labels (1)
7 Replies
Ralf-Narfeldt
Employee
Employee

The most simple thing would be if you used 90 days instead of 3 months as the condition. Then it's a really simple Where clause to add at the end of the Load statement:

WHERE ResignationDate - DOJ > 90

Not applicable

Hi,

use  Interval([Resignation Date]-[DOJ ]) as Days

if you want more than 3 months of employee then use this code

if(Days/30<=3,'0',1) as flag

0 is less than or equal to 3 months experience and 1 is more than than 3 months experience.

Regards

Vimlesh

sagarkharpude
Creator III
Creator III

Try this

if(NetWorkDays(DOJ,Resignation_Date)>90,1,0) as flag

And use flag=1 in your chart

MK_QSL
MVP
MVP

Table:

Load

  *

Where Days > 30;

Load

  EmpName,

  Date(DOJ) as DOJ,

  Date([Resignation Date]) as [Resignation Date],

  Interval([Resignation Date] - DOJ,'DD') as Days

Inline

[

  EmpName,   DOJ,        Resignation Date

  Raju, 16/10/2013, 10/02/2014

  sunil, 06/02/2012, 07/03/2012

  sampath, 17/11/2014, 17/11/2014

  reddy, 14/09/2009, 18/10/2012

  amith, 12/03/2014, 01/08/2014

  sandya, 19/04/2010, 27/11/2012

  Apporv, 25/08/2014, 29/08/2014

  Sameer, 03/10/2011, 26/04/2013

  Akil, 12/01/2009, 26/07/2012

  Nitya, 13/12/2010, 27/05/2013

  Satya, 03/08/2009, 15/05/2013

  Viktanth, 07/07/2011, 22/10/2013

  santu, 20/01/2014, 03/11/2014

  banti, 23/04/2009, 23/04/2012

];

MK_QSL
MVP
MVP

If you want to use 3 Months instead of 90 days, use as below

Table:

Load

  *

Where Months > 3;

Load

  EmpName,

  Date(DOJ) as DOJ,

  Date([Resignation Date]) as [Resignation Date],

  (Year([Resignation Date]) * 12 + Month([Resignation Date])) - (Year(DOJ) * 12 + Month(DOJ)) as Months

Inline

[

     YourData

];

hariprasadqv
Creator III
Creator III

Hi, manish solution is awsome as per my view.

jagan
Partner - Champion III
Partner - Champion III

Hi,

Check this link for getting months difference

Calculating Months difference between two dates

Follow the above above post and use below script

Data:

LOAD

*

WHERE MonthsDifference > 3;

LOAD

   EmpName, 

     DOJ,          

     ResignationDate,

    ($(MonthDiff(DOJ, ResignationDate)) AS MonthsDifference

FROM DataSource;

Hope it helps you.

Regards,

Jagan.