Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
mdmukramali
Specialist III
Specialist III

Need help in finding the Employee Retirement Date

Dear Community,

I need a help in finding the Retirement dates of the employees.

Kindly find the attachment.

Thanks,

Mukram.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

My example is just an example how one might be able to do what you want.

You need to understand the design idea and then adapt to your requirement and data.

For example, if you change the last step from CEO to Coordinator, you also need to change the script load code accordingly:

TMP2:

LOAD *, if(DateRetire<DateStep or PositionStep='Coordinator', 1,0) as RetiredOrLastStep;

This will create this result table:

CurrPos DateRetire DateStep DoB DoJ DurationTotal DurStep EmpID PositionStep Ret_Age RetiredOrLastStep
Team Member10/10/204610/5/202710/10/198610/05/201017101Coordinator601
Team Member1/2/202610/4/202601/02/197010/04/2009173102Manager561
Team Member10/5/201410/9/201510/05/196310/09/201055103Team Member511
Team Leader10/10/204010/10/202410/10/198010/10/200717104Coordinator601
Team Leader10/10/202012/12/202010/10/196512/12/2006143105Assist Manager551
Team Leader10/10/201112/11/201210/10/196012/11/200755106Team Member511
Supervisior10/7/203510/5/202110/07/197510/05/200417107Coordinator601
Supervisior10/7/205010/1/202110/07/199010/01/200417108Coordinator601
Assist Manager10/5/203810/5/201710/05/197810/05/200017109Coordinator601
Coordinator10/10/201610/12/201710/10/196010/12/2000173110Manager561

You requested a retirement date 10/05/2046 for emp 101, and I calculated 10/10/2046 based on the DoB (while you seem to calculate your retirement date based on DoJ). If this is what you need, change the code accordingly, as I said, you need to understand the idea, then adapt.

View solution in original post

6 Replies
swuehl
MVP
MVP

Sorry, I haven't fully understood what you are trying to analyze.

One question first:

In your company, if an employee keeps working for some 14 years, he gets automatically promoted to CEO? Where can one apply? And what about the other CEO's then?

Back to your application:

What do you want to get as a result given your sample data?

mdmukramali
Specialist III
Specialist III
Author

Dear Stephen,

Thanks for Reply.

1)

In my Application i have taken the position data as a Sample.

i have different designations in Original apps.

In my sample application more than one person can promoted to CEO.

in My application I want to get the retirement dates of the employees.

like

EMPID 103

Current Age is 49.

And at the time of Joining date his age is 47.

and his position is a team member.

Duration for the position Team member is  5 Years. means he should be at that position for 5 years then only he will get the promotion.

so after 5 years from joining date his age become 52.

But the Retirement age is for that position is 51.

so he should retire.

so his retirement date is 10/09/2015.

i updated some data in application .

please find the attachment.

Thanks,

Mukram.

swuehl
MVP
MVP

Still a little unclear what you want to achieve.

If you want to project into the future also the upcoming promotions and check if the employee get's promoted, you can try like suggested in attached file (script based solution).

The RESULT table shows the last position an employee holds in his career and his retirement date.

mdmukramali
Specialist III
Specialist III
Author

Dear swuehl,

Thanks for your reply.

I tried your script but it's not giving proper result.

Now i updated the data as well as positions .

i am expecting the result like

emp  [Last Position]  and Date of Retirement

101    Coordinator    10/05/2046

102    Manager          10/04/2026

and so all

--------------------------------------------------------

find the attachment.

Thanks,

Mukram.

swuehl
MVP
MVP

My example is just an example how one might be able to do what you want.

You need to understand the design idea and then adapt to your requirement and data.

For example, if you change the last step from CEO to Coordinator, you also need to change the script load code accordingly:

TMP2:

LOAD *, if(DateRetire<DateStep or PositionStep='Coordinator', 1,0) as RetiredOrLastStep;

This will create this result table:

CurrPos DateRetire DateStep DoB DoJ DurationTotal DurStep EmpID PositionStep Ret_Age RetiredOrLastStep
Team Member10/10/204610/5/202710/10/198610/05/201017101Coordinator601
Team Member1/2/202610/4/202601/02/197010/04/2009173102Manager561
Team Member10/5/201410/9/201510/05/196310/09/201055103Team Member511
Team Leader10/10/204010/10/202410/10/198010/10/200717104Coordinator601
Team Leader10/10/202012/12/202010/10/196512/12/2006143105Assist Manager551
Team Leader10/10/201112/11/201210/10/196012/11/200755106Team Member511
Supervisior10/7/203510/5/202110/07/197510/05/200417107Coordinator601
Supervisior10/7/205010/1/202110/07/199010/01/200417108Coordinator601
Assist Manager10/5/203810/5/201710/05/197810/05/200017109Coordinator601
Coordinator10/10/201610/12/201710/10/196010/12/2000173110Manager561

You requested a retirement date 10/05/2046 for emp 101, and I calculated 10/10/2046 based on the DoB (while you seem to calculate your retirement date based on DoJ). If this is what you need, change the code accordingly, as I said, you need to understand the idea, then adapt.

mdmukramali
Specialist III
Specialist III
Author

Dear Stephen,

Thank you it's working perfectly.

Thanks again.

Regards,

Mukram.

,

'