Program Indicators calculation

Greetings @dhis2-analytics
I am developing program indicators to calculate the percentage as shown below.
I am using dhis2 version 2.36 and chrome web browser

(d2:countIfValue(#{xU1Zh5DbQNW.YUcwFok6lcW},1) / d2:count(#{xU1Zh5DbQNW.YUcwFok6lcW}) ie (1/2)*100
This evaluates to zero instead of %.
NB: I have noted that any data element division that equates to 0.5… always returns zero when multiplied by 100. It should return 50%.
I have allowed decimals in data output when creating the program indicator.


Hi @abdimohammed,

Welcome back! :tada:

I’d like to quote @Markus from an older topic discussion:

Hope this explains it! Please feel free to post back to the community if it’s still not working or mark this post as a solution. :+1:

1 Like

Hi @Gassim,
This works perfectly. Thanks.
It will be of great help to know how to use:
How would you calculate the percentage of functional community health committee from the following Quiz in a program:
a) Is there a functional community health committee? ☐Yes ☐ No
NB: Yes=1, No=0


1 Like

A post was split to a new topic: Calculate percentage in tracker program

Hi @abdimohammed,

Glad it worked! Thanks for marking the solution.

I moved your second question to a new post since it needs a different answer than the initial post. Thanks!