# Supporting Logical Operators (OR / AND) in Aggregate Indicators

**URL:** <https://community.dhis2.org/t/supporting-logical-operators-or-and-in-aggregate-indicators/76653>\
**Category:** Support - Assistance technique\
**Tags:** tracker, malaria\
**Created:** [8 September 2026 08:51 UTC](https://community.dhis2.org/t/supporting-logical-operators-or-and-in-aggregate-indicators/76653 "2026-09-08T08:51:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![crakotondramanitra](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/crakotondramanitra/32/32760_2.png) [@crakotondramanitra](https://community.dhis2.org/u/crakotondramanitra)\
**Post date:** [8 September 2026 08:51 UTC](https://community.dhis2.org/t/supporting-logical-operators-or-and-in-aggregate-indicators/76653/1 "2026-09-08T08:51:16Z")

</div>

While working on indicator configurations for our routine aggregate data in DHIS2, we encountered a limitation regarding logical conditions. Currently, aggregate indicator formulas rely strictly on arithmetic operators (+, -, \*, /).

We would like to propose exploring the possibility of introducing logical operators (“OR” / “AND”) or conditional functions directly within aggregate indicator formulas.

For instance, when calculating indicators involving multiple treatment types (e.g., patients receiving ACT, Malaria treatment, or Paracetamol over positive RDTs), using simple addition can lead to double counting if a patient receives more than one treatment. Having native support for expressions like OR or conditional logic (similar to program indicator functions) would greatly improve accuracy for routine aggregate reporting without requiring complex tracker setups.

Could you let us know if this feature could be considered for future DHIS2 roadmaps, or if there is a recommended workaround for aggregate data elements?

Thank you for your ongoing support and collaboration.

---

<div class="post-metadata">

**Author:** ![fidelelukeka](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/fidelelukeka/32/47692_2.png) [@fidelelukeka](https://community.dhis2.org/u/fidelelukeka)\
**Post date:** [9 September 2026 05:49 UTC](https://community.dhis2.org/t/supporting-logical-operators-or-and-in-aggregate-indicators/76653/2 "2026-09-09T05:49:53Z")

</div>

Thank you for raising this important point.

I have encountered a similar challenge when working with routine health data and DHIS2 aggregate indicators, particularly for malaria-related indicators.

The limitation becomes important when the numerator is based on patients who may receive more than one intervention. For example, if we want to identify patients who received **ACT OR another recommended malaria treatment** among those with a positive RDT, simply adding the corresponding data elements can result in double counting when the same patient is recorded under multiple treatment categories.

In my view, supporting conditional logic such as **OR, AND, IF/THEN, or conditional aggregation** directly in aggregate indicator expressions could significantly improve the accuracy and flexibility of routine reporting.

A possible workaround would be to redesign the data-entry structure so that mutually exclusive categories are captured, but this is not always practical and may require additional data elements or changes to existing reporting workflows.

It would therefore be very useful to have native support for logical/conditional expressions in aggregate indicators, similar to the capabilities available with Program Indicators.

I would also be interested to know whether there is currently a recommended approach for implementing this type of logic in DHIS2 aggregate datasets without moving the use case to Tracker.
