DHIS2 - Custom conditions on the aggregation period when using Aggregation Queries

Hi all,

An additional question about the Aggregation Query Builder. Currently, the period of aggregation between tracked data elements (TDE) and aggregated data elements (ADE) always has to correspond. E.g. for monthly ADEs, TDE data will be aggregated per month based on the event instance report or enrollment date. The following example illustrates this:

  * ADE (July 2014) = Sum (TDE for which the event report date lies in July 2014).

The thing is that his seems to be an inherent condition for each aggregation query you build, so the system automatically applies this logic whenever executing an aggregation query, even if the user doesn't specify any conditions on the period. Now is my question: is it instead possible to drop this condition and do the aggregation over custom-defined periods?

  * An example: ADE (2014) = Sum (TDE for which "Status"="Ongoing"). In this example, whatever the event enrollment date, all event instances are taken into account. The only applicable condition is the "Status".
  * Another example: ADE (2014) = Sum (TDE for which "Report Date"="between 2009 and 2014"). In this example, the aggregated value will be the sum over all event instances created in the last 5 years.

Is this currently possible? If not, has this been foreseen on the roadmap and are there workarounds in the meantime?

Kind regards,