Issue with PI calculations and disaggregations

Hi Community,

I am using DHIS2.42.4 mainly for the benefit of the Maintenance Preview functionality of CatCombo Disaggregations of PIs.
However, I seem to be running into some troubles and some examples listed in the screenshots below:
A line list provides me with the captured tracker DE value and the PI calculation for 4 dummy records (See event report a
events (1).xlsx (12.3 KB)
ttached)
As you can see from this there are fields such as RA:Sexual partner (DE), RA - AYP Sexual Partner (PI) and RA:Sexual behaviour (DE), RA - AYP Sexual behaviour (PI) and each of these is counting that there is a value in the DE field.
However the PI aggregated report (without disaggregations applied) shows 0 for most of the pairs and blanks for some. See RA PI screenshot.

I do have an idea that when adding the PI into a Line list it would use the total value without disagg but still do not understand why the values are not 4 vs 0.
I am also attaching export of 2 PIs one which result in 0 value and one in blank value. I will appreciate any assistance to resolve these issues.

PI Consumed Alcohol:
Alcohol usage PI.json (3.1 KB)


On this one I played around with Event report only with Event count to make it simpler.

PI Substance Abuse:


PI Substance usage.json (3.6 KB)
On this there are period boundaries defined for events before end and after start of period and Enrollment before end of period. Expression Enrollment count.

Both of the above PIs use an AC disaggregation of Age and Gender like this:

We are really battling in 2.42 to get most PIs to calculate correctly and to verify them against results.
My thought is that perhaps some PIs are not good candidates for disaggregation becasue if you use a filter of d2:hasValue({PS_ID.DE.UID)) and then also a disaggregation filter for each of the options using the same DE UID == 1 that may be the problem? Yet which filter do I use then on the PI itself to distinguish between DE in the same stage?

@marta this is one of the PI issues I have highlighted in the HISP groups call last week.

1 Like

Hi Community,

I can see this is a tough one for everyone. So perhaps another question which I have not been able to get the answer to.

Is it possible to use d2:hasValue(#PSUID.DEUID1}) and #DEUID1 == ‘RA_USED_SUB’

In this case the data element is the same, the first is in the filter on the data element and the 2nd is in the CategoryOption Disaggregation.