Aggregating the output of an indicator and not the DE and program indicators it relies on

Good day,

I have an event program that relies on observational data captured as DE (number type). The event program counts the number of observations using program indicators (the program indicators count the number of events with different filters applied to data elements (number type) in the program).

I subsequently have indicators that calculate values based on the program indicator outputs.

This works well at each respective org unit where the data is applied, but not when the data is aggregated to a higher level.

My question is as follows: How to get the system to sum the outputs of the indicator (Indicator output 1 + 2 +3) instead of aggregating the program indicators and then applying the indicator to the aggregated data?

Any assistance would be greatly appreciated as I have scoured the community and could not find anything related to this.

I will also happily provide additional information if required.

Kind regards,


Hi @ACoetzer1988,

Good evening!
I would like to understand your question a bit more please! How are you aggregating the program indicators?

Maybe if you add examples to the process, please?

  1. PR1: Count number of observations
  2. PR2: (PR1 + PR1 + PR1) = PR-OUx ?
  3. PR4: Sum outputs of indicators (PR-OU1 + PR-OU2 + …) ? [why not use count here?]

Sorry I think if it had examples and some explanation to understand the use-case too it would be easier to understand.

Thank you!

Hi @Gassim

Thanks for the quick reply and sorry for my limited detail in my initial post. I will try to provide some additional clarity this time using a simplified version of our problem.

We have developed an event tracker program that captures observation using a Cat option of Day 1 or Day 2 (the only thing the user selects is on which day the observation was made). Because the Cat option is of the “text” type we have a DE that populates with either 1 or 2 using a program rule (If user selects “Day 1” then the DE populates with a 1 and “Day 2” populates that DE with a 2. The DE that gets populated automatically is of “number” type and currently set to “Sum” aggregation.

Following on from data collection we use a program indicator using “count” aggregation that counts the number of observation and applies a filter for the day. This enables us to count observations on day 1 and day 2.

Following on from this we have an indicator that calculates the number of observations on Day 1 and Day 2 (operator) divided by 2 (Numerator) to get the average number of observations across the two days. For each org unit this works well for each org unit where the data is captures.

However, we want to calculate the average across all of the org units where the program has been used (i.e. sum all of the averages and divide by the number of org units where data has been captured using an org unit count as program indicator that is already working as expected.)

We cannot get the averages for each org unit to sum up (average 1 + average 2 + average 3, etc) as the indicator instead takes all of the “Day 1 observational data” across all of the org units + “Day 2 observational data” across all of the org units and divides the number by two. How do we get the system to calculate the average per org unit and sum those averages together?

I am sure the problem lies in either the program indicator aggregation types or the DE aggregation types, but I have not managed to find a solution as of yet when playing around with different iterations.

Please let me know if I can provide any more clarity and I will happily help.

Thanks once again,


1 Like

Thanks so much for the detailed explanation! It’ll require someone with more expertise and I’ve not learned enough about categories. I’m not sure we can use categories in the Tracker programs/events either.

Anyhow, I’ve asked for support for your post.


Thank you @Gassim

I appreciate you helping and asking for more support.

Kind regards,


1 Like

To be honest, I wasn’t able to get it (as I’m still learning DHIS2) why you’re using category options rather than option sets?

1 Like

Hi @Gassim

I apologise for the inconvenience, it is indeed “Option sets”.

Thank you,



Haha! I still need to learn the Category Options in aggregate so when I read those, I froze. :stuck_out_tongue:

I will try again with option sets. :+1:

1 Like