Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
harika189
Contributor II
Contributor II

Calculate Person Age Approaching 18 years

Want to know how to implement a qlik sense script in data load editor to calculate if the persons age is approaching 18 in next 30 days 

Labels (5)
1 Reply
ajaykakkar93
Specialist III
Specialist III

yes we can do this, find the below backend code

 

data:
load
  Emp_ID,
  EMP_Name,
  Birthdate,
  [Birthday In This Month],
  [Birthday In Next Month],
  Age
  ;
load
  Emp_ID,
  EMP_Name,
  Birthdate,
  if(Month(Birthdate) = Month(today()) , 'Yes','No' ) as [Birthday In This Month],
  if(Month(Birthdate) = Month(AddMonths(today(),1)) , 'Yes','No' ) as [Birthday In Next Month],
  age(today(),Birthdate)  as Age;
load * Inline [
Emp_ID,EMP_Name,Birthdate
1,A,30/11/2005
2,B,22/09/1993
3,C,18/12/1993
4,D,18/10/1993
];


Exit Script;

 


Output:

ajaykakkar93_1-1698736160269.png

 

 

Please mark the correct replies as Solution. Regards, ARK
Profile| GitHub|YouTube|Extension|Mashup|Qlik API|Qlik NPrinting