Hello everyone
I would like support in creating a program indicator that counts the number of beneficiaries without at least one event in a given period.
Regards
Hello everyone
I would like support in creating a program indicator that counts the number of beneficiaries without at least one event in a given period.
Regards
Thanks for the post! @dguambe itād be very helpful if you add more details. Are the beneficiaries Tracked Entity Instances which means we will be counting the number of enrollments in the program? Or are the beneficiaries created as Data Elements?
Itās not clear when you say āwithout at least one event in a given periodā Is that a program stage? or an event in a program stage? Itās not clear, are you trying to exclude a period or include the period? The period for enrollment or for the program stage?
Please clarify and it might also help if you explain the use case.
Thanks!
Hi @Gassim
Thanks for reply , please find the details
Use case
I have a beneficiary receiving services during the year
I want to count the number of beneficiaries who received services in Q1 and did not receive any services during Q3
The program has only one stage
Thanks!
In this case, it means we want to count the number of enrollments that received event >= 1 in a certain period of time during a year. I can make a suggestion and might need your help in making it work so feel free to suggest to edit it or improve it please:
In the expression, we could do something like:
d2:condition("V{enrollment_status} == 'ACTIVE'",1,0)
and in the filter, I was thinking something similar to this:
V{event_date} < 'YYYY-04-01'
I mean by āYYYY-04-01ā as the beginning of the third quarter of the year. However, Iām not sure thereās a way to make it generic for each year (using YYYY doesnāt really work.)
If thatās complete we can then create the number of times 1 is returned by creating an Indicator. Although, this is not really successful considering the limitations; however, I propose if thereās another way to approach this? Are there other factors that we could add to the equations in order to make the distinction more possible?
Thanks!
Thatās great to hear. Would you share the expressions that worked? Thanks!
A more generic solution would use analytic period boundaries with period offsets.
This allows for shifting of the program indicator window relative to the reporting period. You would not need to make a different program indicator for each quarter.
The example below would identify all enrollments with:
To filter for enrollments without an event in Q3, you need to use a !d2:hasValue()
with a mandatory data element: d2:hasValue(#{stageUID.MandatoryDatalementUID})
Expression is V{enrollment_count}
Note that because the boundaries are based on the length of the reporting period, you would need to be sure this is only used in data visualizer or tables where the period is quarterly
More details on such an approach in tracker design guide here