How can I create Indicator that aggregate at facility level filter with a OUG data only

Consider this scenario. I have 5 level organization units with 300 facilities as FAC at level 5, three org unit groups (OUG1, OUG2 and OUG3), and five data elements DE1, DE2, DE3, DE4, DE5.

Suppose FAC 1-100 belongs to OUG1, FAC 101-200 belongs to OUG2 and FAC 201-300 belongs to OUG3.

  1. The total score of DE value that FAC 1-100 in OUG1 can have is 50

  2. Each DE assign to FAC 1-100 has a score with SUM as aggregateType. The total of these DEs in this case DE1 + DE2 + DE4 + DE5 cannot be more than 50.

Data is collected at level 5 of the OU which is FAC 1-100. But our indicator will like to aggregate at level 1 which is the highest level.

I define my indicator as below.

Numerator = DE1 + DE2 + DE4 + DE5
Denominator = 50
Indicator type is percentage.

Manually when I take the total DE score aggregated at level 1 as numerator and divide it by facility count of OUG1 times 50, multiply by 100, I got the expected result.

But with the indicator above in data visualizer app, rather than pick the DEs for the OUG1 only, the system is summing up the DEs for all the 300 facilities.

Is there a way to filter the numerator to only use data from facilities within the OUG1 group instead of all the facilities in the visualizer app?

Thanks for the post @jetisco4u! Please did you try to use Advanced aggregation settings (aggregation levels)?

1 Like

I tried to but maybe I am missing some aspect of it.

Maybe if there’s a different approach or solution to this. Perhaps if you share the use case, it might be more feasible to find a possible solution or if it might already be implemented but using a different approach?

Thanks!

I have explore different approach with conflicting result. I will still keep exploring

1 Like

@Gassim Talking about this, I am having an interesting result or experience. When I create an indicator for the average score from a particular OUG, I have a slightly different result depending on the setting of the parameter queries.

SCENARIO 1

In this case I put the Data under Column, Organisation Unit under Row and Period under Filter. Under Option tab I select Average for Aggregation type. The average score from all the OUG1 facility return 63.5% for facilities with data values only.

SCENARIO 2

In this case I put the Data under Column, Organisation Unit under Filter and Period under Row. Under Option tab I select Average for Aggregation type. The average score from all the OUG1 facility return 64.3% for facilities with data values only.

Significantly just by changing the position of the organisation unit, I got 0.8% in the value different. Meanwhile when I did a manual calculation of all the scores and divide by the expected denominator I got the 63.5 of the Scenario 1.

Unfortunately, I can’t use the Visualizer result because we wanted the result at the level 1 of the organisation unit.

Does moving the organization unit from Row to Filter impact on the calculation?

1 Like

Good question and observations! Thank you @jetisco4u! Hopefully someone from the community experts or @dhis2-analytics will help us out. I’m triaging this post. :+1:

And @jetisco4u please mention the version number of the DHIS2 instance that you are using - just in case this needs testing. Thanks!!