← Back to team overview

dhis2-devs team mailing list archive

Issue with calculation of Age through program indicator

 

Hi Devs

 

Have been trying to create a program indicator for calculation of Age (in
years) using the 'd2yearsBetween' expression (have tried with
'd2daysBetween' as well), and then putting the attribute for date of birth,
and event/current date. The date of birth is not part of the attribute list
in the 'Expression' part of the program indicator, hence the attribute UID
(for DOB) is used instead in the expression.

 

Although the expression is shown as valid, but the output is still 'NaN'.

 

Similar indicators are available on the dev instance
(https://play.dhis2.org/dev/) for the MNCH program for Mother's Age at visit
in years/days, but there also the value shows as 'NaN'.

 

Would appreciate some help around this, if this can be fixed, or we are
doing something wrong here!

 

Regards

 

Saurabh

 


Follow ups