Creating Percentage Program Indicators from Numerator and Denominator Program Indicators

Hallo,

Thank you for your continued support. I am very new to DHIS2 Tracker programs. I am using DHIS2 version 2.40.1.

I have successfully created two Program indicators from a tracker program. One PI_Numerator and the other PI_Denominator. I want to you these Program indicators to calculate the percentage of a new program indicator (PI_XXX_Rate) with this formular (PI_Numerator/ PI_Denominator)*100.

I am NOT able to trace PI_Denominator or PI_Numerator to use them to create PI_XXX_Rate

Or
How do I use the expressions below used to create PI_Denominator and PI_Numerator to create PI_XXX_Rate

PI_Denominator expression: d2:condition(‘isNotNull(#{eV0Cs6Wdl8w.n78ALDPo3ym})’,1,0)

and

PI_Numerator expression: d2:condition(‘isNotNull(#{IbB9QEgQU6D.BW86oe5G4i7})’,1,0)

Please help. Thank you.

Hi @Geoffrey_Nyamongo

Click on the indicator to get its ID and then in the new expression, you can use N{indicator_ID}

For example, (N{PI_Numerator_ID}/N{PI_Denominator_ID})*100

Thank you so much. I have tried and I am getting the error on the image below.

What could be the problem?

Thank you.

1 Like

Hi @Geoffrey_Nyamongo

Apologies, there are things that I didn’t clarify in my previous post. When it’s a program indicator and not an indicator we use the expression I{PI_UID} instead of N{indicator_UID} and it appears that this expression will work if you are creating an indicator. For instance, you can create an indicator (not a program indicator) with the expression as you can see in the screenshot below:

Would it be possible to create an Indicator for your use case instead of a program indicator?Otherwise, could you explain the use case further? You might need to use the expressions directly in the Program Indicator.

1 Like

Dear AL-Gassim,
Thank you so much for your help. It has worked. I appreciate your help.

1 Like