Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Announcing the newest addition to the Qlik Community, Qlik Gallery! Learn More
Not applicable

Calculate No. of Year between 2 dates(QlikSense)

Hi All,

I have one filed as "JoiningDate" and other as " BirthDate". I want to calculate "Age" i.e difference between 2 dates in no. of years  for each record and then need to calculate Avg Age.

How can I do this either in Load Script or in directly chart function. Please help. thanks.

1 Solution

Accepted Solutions
Highlighted
MVP & Luminary
MVP & Luminary

Re: Calculate No. of Year between 2 dates(QlikSense)

I think the most simplistic calculation could be this:

round( (JoiningDate - BirthDate)/365 )

Cheers,

Oleg Troyansky

Upgrade your Qlik skills at the Masters Summit for Qlik - coming to Boston, MA this October!

2 Replies
Highlighted
MVP & Luminary
MVP & Luminary

Re: Calculate No. of Year between 2 dates(QlikSense)

I think the most simplistic calculation could be this:

round( (JoiningDate - BirthDate)/365 )

Cheers,

Oleg Troyansky

Upgrade your Qlik skills at the Masters Summit for Qlik - coming to Boston, MA this October!

MVP
MVP

Re: Calculate No. of Year between 2 dates(QlikSense)

Maybe using the Age() function?

age - script and chart function ‒ Qlik Sense