Hello,
I found an annoying thing that was annoying in InfluxQL already:
Sometimes I need to count measurements for specific Criteria and do Calculation with the counts. If for some reason zero Measurements match a given Criteria the count() aggregate doesn’t return the number 0. Instead it returns null, which makes it hard to build consistent Graphs…
from(bucket: “treasmap/autogen”)
|> range(start: -12h)
|> filter(fn: (r) => r._measurement == “foo” and r._field == “bar” and r.tag1 == “somevalue” and r.tag2== “someothervalue” and r.tag3== “0”)
|> window(every:inf)
|> group(columns: [“time”])
|> count()
Fill won’t help me here either, because it doesn’t fill the result value of the aggregate.
Do I completely miss something here?
There’s a Github Issue from 2016 at [Feature Request] COUNT(): return zeros instead of no results · Issue #6412 · influxdata/influxdb · GitHub, which has been triaged and flagged.
regards,
mephisto