I don't concur with that characterization. Any interpretation, correct or otherwise, is at least partially subjective. The sum of zero values IS zero, as I mentioned before. Whats the sum of the coins in your pocket? If you have no coins in your pocket, zero is (IMHO) an accurate answer.
When you sum numeric data you have to lose information, 4 == 1+3 == 2+1+1 == 2 + (-2) == ...
.
I'd say 100 zeroes added together are the same as zero zeroes added together. If you want/need to know how many terms were added to reach a sum given, you need to show that too.
More accurate is that there are Kibana UI options which allow some flexibility between showing zero as zero, or as "-", which is the same as the UI uses for missing values in many scenarios. You could raise an enhancement request for this, just ask to use a different symbol (maybe β
) for missing values, but as that's a pretty established option/convention in the kibana UI I'd expect it to be rejected.
Below is some data matching what you described which I used for testing.
I would visualize this in a old-style table as follows:
or in Lens via:
Personally, and though I appreciate @Tortoise was just trying to meet your requirements, I would much rather not show "-1" for a sum when "-1" is NOT the actual sum. That sort of mental jump, an invented convention, might appear simple today, down the line when everyone involved has moved on, good chance it's just confusing. YMMV.
POST _bulk
{ "index" : { "_index" : "zerotest", "_id" : "1" } }
{ "@timestamp": "2025-05-01T12:00:00Z", "field1" : 0 }
{ "index" : { "_index" : "zerotest", "_id" : "2" } }
{ "@timestamp": "2025-05-02T12:00:00Z", "field1" : 0 }
{ "index" : { "_index" : "zerotest", "_id" : "3" } }
{ "@timestamp": "2025-05-03T12:00:00Z", "field1" : 0 }
{ "index" : { "_index" : "zerotest", "_id" : "4" } }
{ "@timestamp": "2025-05-04T12:00:00Z", "field1" : 0 }
{ "index" : { "_index" : "zerotest", "_id" : "5" } }
{ "@timestamp": "2025-05-05T12:00:00Z", "field1" : 0 }
{ "index" : { "_index" : "zerotest", "_id" : "10a" } }
{ "@timestamp": "2025-05-10T12:00:00Z", "field1" : 20 }
{ "index" : { "_index" : "zerotest", "_id" : "10b" } }
{ "@timestamp": "2025-05-10T13:00:00Z", "field1" : 4 }
{ "index" : { "_index" : "zerotest", "_id" : "11a" } }
{ "@timestamp": "2025-05-11T12:00:00Z", "field1" : 40 }
{ "index" : { "_index" : "zerotest", "_id" : "11b" } }
{ "@timestamp": "2025-05-11T13:00:00Z", "field1" : 7 }
{ "index" : { "_index" : "zerotest", "_id" : "12a" } }
{ "@timestamp": "2025-05-12T12:00:00Z", "field1" : 50 }
{ "index" : { "_index" : "zerotest", "_id" : "12b" } }
{ "@timestamp": "2025-05-12T13:00:00Z", "field1" : 7 }
{ "index" : { "_index" : "zerotest", "_id" : "13a" } }
{ "@timestamp": "2025-05-13T12:00:00Z", "field1" : 80 }
{ "index" : { "_index" : "zerotest", "_id" : "13b" } }
{ "@timestamp": "2025-05-13T13:00:00Z", "field1" : 9 }
{ "index" : { "_index" : "zerotest", "_id" : "14a" } }
{ "@timestamp": "2025-05-14T12:00:00Z", "field1" : 40 }
{ "index" : { "_index" : "zerotest", "_id" : "14b" } }
{ "@timestamp": "2025-05-14T13:00:00Z", "field1" : 10 }
{ "index" : { "_index" : "zerotest", "_id" : "14c" } }
{ "@timestamp": "2025-05-14T13:00:00Z", "field1" : 3 }
{ "index" : { "_index" : "zerotest", "_id" : "15a" } }
{ "@timestamp": "2025-05-15T12:00:00Z", "field1" : 60 }
{ "index" : { "_index" : "zerotest", "_id" : "15b" } }
{ "@timestamp": "2025-05-15T13:00:00Z", "field1" : 1 }
{ "index" : { "_index" : "zerotest", "_id" : "15c" } }
{ "@timestamp": "2025-05-15T14:00:00Z", "field1" : 1 }
{ "index" : { "_index" : "zerotest", "_id" : "15d" } }
{ "@timestamp": "2025-05-15T15:00:00Z", "field1" : 1 }