Age Group

I am new to DHIS2 and I am finding it challenging to design a pivot table with multiple categories, eg; a pivot table that has age-groups per gender in an orgunit plus other indicators? Data was collected using a Tracker Program. A step by step approach will be highly appreciated.

1 Like

Hi @spalavi

You can use program indicators and create for each age group so they can be used in pivot tables and visualizer.

Or else you can use legends and apply them on the attribute age then use it in events.


1 Like


Hi Prosper,

Thanks for reply and please could you help me creating this table attached in DHIS2.

Much appreciate your help.


1 Like

Dear @spalavi

With legends you can achieve this

and this

1 Like


Happy to hear from you and appreciate all your help. Please take note I am new to this and I am trying to figure out how to retrieved aggregate values data on event report. Refer to the attachment below there is no data

Also let me know how to setup range set.


1 Like

Hi @spalavi

Sorry for the shortcuts,

To create legends; what is referred as range in events reports; Go to maintenance>> All>> Legends
Add a legend according to your ranges

After creating the legend, then assign the legend to your age attribute (tracker) or data element(events)

Note you can assign more than one legend allowing you to switch in between different age ranges

Regards and hope this helps


Hi @prosper ,
if apply on data element, it is working fine. but it doesn’t work with tracker attribute.
do you know how to apply legend age group to tracker attribute in event report?

thank you

1 Like

Hi Prosper

Thank you for this. In a case where my attribute is of type date, like date of birth, Can i still use legends?

I am currently pulling that data through program indicators, but will like to use ranges/legends.


Hi @feh ,
Welcome to the community! :tada::tada::tada:

You are using the Events app, isn’t it? Please what DHIS2 version are you using? I think you can definitely add the DoB as long as you can see it in the program stage attributes. See example from play: