← Back to team overview

dhis2-devs team mailing list archive

Re: [Bug 436692] Re: Blanks are displayed as 0 in report

 

>
> returns 70. I am missing two districts, who reported nothing. I think
> this is the behaviour you a mentioning, namely that zeroes (or blanks)
> should not be written to the data mart?
>

Yes.


>
> However, for the aggregateindicatorvalue table, blanks are written to
> the table as zeroes.
>
> SELECT COUNT(DISTINCT(organisationunit.name)) from aggregateddatavalue
> INNER JOIN organisationunit on aggregateddatavalue.organisationunitid =
> organisationunit.organisationunitid
> WHERE organisationunit.name ~* 'District'
>
> Returns 72 districts now, with the districts that have submitted
> nothing, receiving a "0" in the numerator value.
>
> I think somehow this is strange, as the numerator for the indicator
> was included as part of the data mart export. So, it does not get
> written to the aggregateddatavalue table, but does get written to the
> aggregatedindicatorvalue table. I think this may be the issue that Tom
> is raising, and the related issue of "blanks" being displayed as zeros
> in the maps.
>
>
OK. That's where the mentioned system setting comes in ("Omit indicator
values with zero numerator value"). The difference between the 0s in the
agg.datavalue table and the 0s you mention in the agg.indicatorvalue is that
the lattter has a non-0 denominator value. (Entries with 0 denominator
values are skipped completely). These values might be interesting when you
are working eg. with pivot tables, which will use both the numerator and the
denominator value when performing aggregation on its own. This is the reason
why we included both numerator and denominator values in the
agg.indicatorvalue table in the first place.


Lars

Follow ups

References