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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
rittermd
Master
Master

Can you explain this expression to me

I sort of know what it is doing.  But not 100% sure.

Age(

  if(Current_Active, MakeDate(2016,7),Date#(termination_date,'YYYY-MM-DD')),

Date#(Hire_Date_Most_Recent,'YYYY-MM-DD')) as Tenure

Ultimately it is calculating the length of time an employee worked for the company if they terminated.  What is the MakeDate(2016,7) actually doing in this expression?

1 Solution

Accepted Solutions
sunny_talwar

Yes, if the employee is active then July 1st - Hire Date, else Termination date - Hire Date

View solution in original post

3 Replies
sunny_talwar

That is hardcoded date of July 1st 2016

Make date take the following paramters:

MakeDate(Year, Month, Day)

rittermd
Master
Master
Author

I figured that.  But how is that date being used in this calculation?

Is it saying if Current_Active then use July 1st 2016 else use the termination date?

sunny_talwar

Yes, if the employee is active then July 1st - Hire Date, else Termination date - Hire Date