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: 
hemachandran
Partner - Creator
Partner - Creator

I need new tenure days when title has changed to the employee

I have attached the sample data. In that data i have month wise data at the month end.I have tenure days based on the DOJ. When the employee changes from one position to another position the DoJ has to change when changed date of the title. And it has to be the DOJ.

From that date i need new tenure days for the current position. please help on this..

Thanks in Advance..

1 Solution

Accepted Solutions
sunny_talwar

I think there is an issue with your DOJ date format and CalDate format. DOJ is actually formatted as M/D/YYYY in the Excel file. Can you try loading this one

View solution in original post

21 Replies
sunny_talwar

Is this something you need in the script or front end?

Anonymous
Not applicable

so when employee changes the position..CAL date should be DOJ ?

Am I right?

vinieme12
Champion III
Champion III

See attached

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Anonymous
Not applicable

Check it out

hemachandran
Partner - Creator
Partner - Creator
Author

I need in script sunny..Thanks for ur response..Thanks in advance..

hemachandran
Partner - Creator
Partner - Creator
Author

yes..correct..Thanks for ur response..Thanks in Advance..

hemachandran
Partner - Creator
Partner - Creator
Author

Thanks for ur response i did not get correct answer...from ur answer...Can u try by using flag..when title is changed..

hemachandran
Partner - Creator
Partner - Creator
Author

Thanks for ur response..Still i didnt get correct answer. I need new tenure when title changed. Its wants to start from 0.

Thanks in Advance

vinieme12
Champion III
Champion III

try this

EMPDATA:

LOAD  Empcode,

Empcode&'-'&Title as KEY,

     CalDate,

     Month,

     Year,

     Title,

     DOJ,

    if(len(DOJ)<1,CalDate,DOJ) as TitleDate

    

FROM

(ooxml, embedded labels, table is Sheet1)

;

EMP_LIST:

LOAD

  DISTINCT KEY,

  if(MAX(TitleDate)-MIN(TitleDate)=0,min(CalDate)-min(TitleDate),MAX(TitleDate)-MIN(TitleDate)) as TenureDays

RESIDENT EMPDATA

  GROUP BY KEY

  ;

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.