I want to make a program indicator that can count the number of events at a given OU and with dates that fall within a given period. How can I configure this? I am using version 2.35.
I tried using d2:count in the indicator expression, but this does not work. If I view this indicator in the data visualizer and select an OU, it gives me the total number of events for the entire OU hierarchy, not the number registered at that specific OU. The same goes if I select a given period - it gives me the total number of events for all periods.
I can’t find any documentation explaining how to configure the indicator correctly, so I appreciate the community’s help!
It’s supposed to normally disaggregate the result for you when you click on the OU and period. Could you add the steps to how you configured the program indicator? And if possible reproduce in an play.dhis2.org instance?
I looked at this topic, and did some testing my self, and hope this can help you.
I created a program indicator with the following config:
Aggregation type = Count
Analytics type = Event
Analytics period boundaries
Event date - Before end of reporting period
and event date - after start of reporting period
In expression: V{event_count}
In filter: d2:hasValue(#{CWaAcQYKVpq.bl7EMKxJIIT})
Filter saying that the data element need to have a value in the program stage.
In data visualizer when choosing ngelehun I will only get the number of events where the data element has a value, and this seems to count the right number for me. This includes active and completed enrollments and active and completed events
If you want to filter only active events add: && V{event_status} == ‘ACTIVE’ in filter.
Documentation on functions and variables is available here
What is meant by open, active or completed event/enrollment?
How do we know that an enrollment or an event is still active or inactive, completed or incomplete in the context of repeatable and non repeatable stages.