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

Announcements
Now accepting applications for the Qlik Luminary and Partner Ambassador Programs: Apply by July 6!
cancel
Showing results for 
Search instead for 
Did you mean: 
nevilledhamsiri
Specialist
Specialist

Age to be calculated to the nearest Month

Dear Members,

Once Age table is created, ages in Months are getting zeros, how this will be made to nearest Month such as 0.3,0.4 etc.

 

Thanks

Neville

 

 

 

 

 

Labels (1)
1 Solution

Accepted Solutions
Anil_Babu_Samineni
MVP
MVP

Can'y you simply this, Instead AGE()?

=(Year(Today())-Year(Date(DATE_JOINED)) & ' Years') & ' ' & (Month(Today())-Month(Date(DATE_JOINED))) & ' Months'

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

7 Replies
nevilledhamsiri
Specialist
Specialist
Author

 
Anil_Babu_Samineni
MVP
MVP

Perhaps like this?

=If(Age(Today(), DATE_JOINED)>1, Age(Today(), DATE_JOINED), Month(Today())-Month(Date(DATE_JOINED)))

Or, Self satisfaction 🙂

=If(Age(Today(), DATE_JOINED)>1, Age(Today(), DATE_JOINED) & ' Years',  (Month(Today())-Month(Date(DATE_JOINED)) & ' Months'))

Image for Ref : 

Capture.PNG

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
nevilledhamsiri
Specialist
Specialist
Author

Could you please please send me the formula I cannot open up the qvd

 

Thanks

Neville

  

Anil_Babu_Samineni
MVP
MVP

It is there in the body message 🙂

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
nevilledhamsiri
Specialist
Specialist
Author

Dear Anil,

I added some more records with 2018 , then the calculation seems to be some what wrong only for those who joined 2018.

Could you please look in to this

 

Neville

 

Anil_Babu_Samineni
MVP
MVP

Can'y you simply this, Instead AGE()?

=(Year(Today())-Year(Date(DATE_JOINED)) & ' Years') & ' ' & (Month(Today())-Month(Date(DATE_JOINED))) & ' Months'

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
nevilledhamsiri
Specialist
Specialist
Author

Thanks Anil,

 

This is ok now.

 

Neville