COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: peewan on 30 May 2020 08:16:23 PM

Title: Calculate Age base on end of month
Post by: peewan on 30 May 2020 08:16:23 PM
So I have the report 2019-01-01 to 2019-12-31, Age basket: <1, 1-10, 11-21; and have to calculate doctor visits base on Age - end of each enrollment month.

Age = (2019-01-31, DOB)
Age = (2019-02-28, DOB)
...
How can I do this?

Thank you
Title: Re: Calculate Age base on end of month
Post by: magicianer on 03 Jun 2020 08:07:31 AM
You can use the _last_of_month() function on your enrollment month field and then compare it to the date of birth field using _years_between().