But the <1 range (0 to 0) and Unknown range are not considered at all in pivot tables. When I remove the legend set from the data pan, I can see the records that have 0 and -1 values.
Is my definition wrong? Am I missing something or is this a bug?
It looks like your legend is incorrectly defined. Your ranges must overlap. To make a range that includes zero you should have something like
-1 to 1
1 to 9
etc. . . …
DHIS2 would translate that more specifically in terms of absolute values as:
-1 to 0.9999999
1 to 8.9999999