Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

anilet123
New Contributor II

Age() Function not working in qliksense. Can anyone help on this ?

Age() Function not working in qliksense. Can anyone help on this ?

1 Solution

Accepted Solutions
MVP
MVP

Re: Age() Function not working in qliksense. Can anyone help on this ?

Age() is the difference in years. The difference between Collection_Date and Bill_Date is less than 1 year, so Age = 0 is correct.

I suspect you are looking for age in days. Just subtract the dates - choose one of the expressions below according to your requirements.

     =Collection_Date - Bill_Date

     =Interval(Collection_Date - Bill_Date, 'd')

     =Floor(Collection_Date - Bill_Date)

     =Interval(Floor(Collection_Date - Bill_Date), 'd')

6 Replies
pritamb89
Contributor

Re: Age() Function not working in qliksense. Can anyone help on this ?

My code is working fine. Try to type it manually .when i copy and pasted from qlik help site example it was not working so i typed it manually and it working fine

=AGE('12/12/2013','06/07/1989')

here is my output

Capture.PNG

Capture2.PNG

anilet123
New Contributor II

Re: Age() Function not working in qliksense. Can anyone help on this ?

Hi Pritam,

Thanks for the update. I am using QlikSense desktop version November 2017 Patch 2.

I tried using the function in load script as well as in UI both dint work for me. I do not want to hard code the value instead want to calculate based on fields End_Date and Start_Date.

Age() is a beautiful function in qlikview. I hope Qlik fixes this issue in QlikSense asap.

Regards,

Anilet Nirmal

pradosh_thakur
Valued Contributor III

Re: Age() Function not working in qliksense. Can anyone help on this ?

what are the date format in both the date ? any sample you can provide?

anilet123
New Contributor II

Re: Age() Function not working in qliksense. Can anyone help on this ?

Please find the data exported from qliksense chart. Date format is 'M/D/YYYY'.

Function used is Age(Collection_Date,Bill_Date)

Capture.PNG

MVP
MVP

Re: Age() Function not working in qliksense. Can anyone help on this ?

Age() is the difference in years. The difference between Collection_Date and Bill_Date is less than 1 year, so Age = 0 is correct.

I suspect you are looking for age in days. Just subtract the dates - choose one of the expressions below according to your requirements.

     =Collection_Date - Bill_Date

     =Interval(Collection_Date - Bill_Date, 'd')

     =Floor(Collection_Date - Bill_Date)

     =Interval(Floor(Collection_Date - Bill_Date), 'd')

anilet123
New Contributor II

Re: Age() Function not working in qliksense. Can anyone help on this ?

An eye opener .. Thank you Jonathan.

I assumed its a bug in QlikSense. I was wrong.

Regards,

Anilet Nirmal

Community Browser