I’m trying to create an indicator that uses dataElements from different periods. For example, comparing the number of malaria cases in April 2024 to the number of malaria cases in April 2023. However, I can’t find a way to specify the specific period of each variable used in the formula. Ideally, there would be a way to do this in a programmatic way so it would always be 12 months prior (at least in the example above).
Does anyone know of a way to achieve this using the native indicator format? If not, what would be the recommend workaround that still follows DHIS2 data norms? My current plan is to just create a separate dataElement corresponding to this value and calculate it via an outline analytics module, but this obviously adds extra complication (and dependencies) to the process.
try to create 2 different program indicators for respective period, then create an indicator, which will use them both. If it doesn’t work, then try to play with program indicator’s report period, but not in the analytical period boundary. Try to use filters like :
(isNotNull(#{cxBjDZwpT4F.FhB9khAEAWY}) && d2:monthsBetween(#{cxBjDZwpT4F.FhB9khAEAWY}, V{current_date}) <= 12
I haven’t yet been able to get this to work. It seems like program indicators can only be used with Event Tracker data, if I’m not mistaken? I am trying to do this for aggregate data. For example, I want to create an indicator that represents the ratio between the number of malaria cases in April 2024 to the number of malaria cases in April 2023. This means the numerator would be the standard dataElement representing this, and the denominator would be the same dataElement, but 12 months prior. These numbers are reported at the level of the health center, already in aggregate.
Is it possible to use this d2:monthsBetween functionality with indicators? Or maybe use the .periodOffset?
“Unfortunately periodOffset, as well as many other special indicators functions, will not work within the data entry app.” as @Jim_Grace said, in the Link you have referred above, is still the case.