Program Indicator based on dates

We are trying to build a program indicator based on the date of the program stage.
e.g. if the stage date is more than 01 Aug 2019, the indicator should be 1 else it should be 0
We tried to use the d2:condition() and d2:daysBetween() but to our knowledge DHIS2 doesn’t allow the nesting of 2 functions inside each other, hence we can not compare if d2:daysBetween() is >0 or negative

Does anyone have any idea of how to solve this issue?
Cc @dhis2-tracker

Thank you in advance.

1 Like

Hi @SDKAAA,
It seems you can try to build a indicator with aggregation type=COUNT, expression V{event_count}, and the filter can be the daysBetween condition for the items you want to count.

Markus

1 Like