Calculated Indicator Total showing undefined where value is zero

Let’s say I have data elements DE1 and DE2. From these data elements I created an indicator Ind where Ind = DE2-DE1. So if DE2 = 4 and DE1 = 4, Ind = 0.

In the data visualizer app, I got the zero value in the Pivot table. But when I select Columns Total to get the sum of all the columns, I got undefined where the value is zero instead of it returning the zero value.

As shown in the attached diagram, I got undefined when the aggregate sum of the column is zero. In the other instance I got the correct value of 1.


1 Like

Hi @jetisco4u

Thank you for your post! I can reproduce this issue. It seems like the total is calculated in the app itself (not the API) so it might be a bug in the app. If the zeros are added as text type and not numbers then this probably the reason. :thinking: Would you like to create a bug issue Projects - Jira?

Thanks!

Sure I will try create a bug issue

@Gassim I am not sure under which project I should list the issue in Jira.

Does this happen in cases where you have numbers like “0 + 9” in a given column? Agree, smells like a bug to me.

1 Like

As seen in the picture, the 0+6 sum to 6 as expected. I guess the problem is when the summation is zero

1 Like

Looks like it. I suspect the zero is being ignored entirely (when everything is zero) and you end up with “Undefined”.

2 Likes

Hi @jetisco4u

I created a ticket under the DHIS2 Software project, [DHIS2-14511] - Jira

The developers will have a look at it as soon as they get to it.

Thank you!

1 Like

Thanks sir I will follow up.

1 Like

Seems there is no update on this yet.

1 Like

I created a visualization with two data that sum to 0. When I select the option to show row totals, I got undefined instead of 0. Is this not fixed in 40.0v?