They all use a query similar to this: SELECT last(“value”) FROM “autogen”.“Lutz_Heiz_Status_Stellgroesse” WHERE $timeFilter GROUP BY time($__interval) fill(previous)
(to make an average of a (quasi-binary, but actually numerical) signal after forwardfilling.)
However some of the gauges are not shown here. I am talking about the ones where the query above returns “no data” → 0 results from Influx.
I want to show them as zero because that’s what it will practically mean in my case. I can’t manage to make it work. I found some ideas with the “or on() vector(0)” approach to return a zero number instead of “no data”. But I couldn’t make it work probably because it’s using a newer query language or newer features that I am not familiar with.
My task sounds simple enough, right? So I assume there is an easy solution that I am missing)
(It would show up with “no data” if I only have 1 gauge, but since I have several it “automatically” seems to hide the “no-data” ones; therefore also the “override no data” thing does not work here)
Thanks for your response. Let me be more clear. I am not making one query (like the one that was described above) but I am making multiple of those. Like 8 or so. So grafana knows exactly how many gauges there are in theory. Some automatism seems to hide the gauges that have „no data“. If all the gauges would just show up (either with the numerical data or with a „no data“ text) I would understand and agree to the behavior (and if I could apply the override / value mapping thing that converts the „no data“ into a zero or something then it would be even better / what I want) but the gauges simply do not show / disappear .
It feels like there should be a switch somewhere like „hide empty gauges“ that is auto enabled and hidden from me. I don’t know. Or is it even a bug in v11 - I cannot say.
but as soon as I unhide the second (valid) query, the gauge for the “no data query” (spielzimmer) automatically disappears and I can only see the one for WCBad (valid):
Currently I use the InfluxQL, not flux! The InfluxQL syntax looks to me more familiar (SQL-like) than flux. Since the future might be to use SQL in Influx, hopefully I don’t need to familiarize with flux at all. (However I cannot use SQL yet on my X-Influxdb-Version: 1.8.10 (latest on Home Assistant)).
With all my other dashboards / visualizations I managed well with InfluxQL so I was hoping I don’t have to change to “flux” now because of this. Should there not be an easier way? At the end of the day I just want to override an empty/nan value with a zero…
hm… ok can we say at least if the behavior is a bug or a feature? (i was on an older version of grafana for a long time and upgraded just before I created/modified this panel, so I cannot tell)
in all other datasources that I have used it has the same behaviour. but you can bypass it by returning some data by checking that there is no data like you would in a left join
stand up that same older version and recreate that datasource and that dashboard or reimoprt it and see if a regression bug might have been introduced. the onus and due diligence falls on you
Ok, I‘m not sure if I can roll back on Home Assistant but I can install an older version of grafana on my windows machine or RPi - will give it a try to see if behavior is more understandable
not sure anyone here recommended you upgrade or rollback HA. the idea of rolling back was specific to grafana as you indicated it was grafana you upgraded?
yes, you are right. I quickly checked with grafana 9.5.20 to confirm. and behavior is the same:
the “no data” gauges do not show up if at least one gauge has data (so it seems to be the intended behavior since a long time and nothing that was changes recently). Still would be nice to have a boolean to enable this behavior or disable it (show all gauges) → possible feature request?
thank you for the solution-oriented approach to make 9 small panels with 1 gauge each. I thought about this as well and might do this if it will not look bad (depending also how it looks on the phone / mobile browser / small screen).
I just noticed one thing that is annoying in v11 that was not there e.g. in 9.5.20:
We already talked about the case where we have no data. and it gets handled nicely in the 1-gauge-per-panel case with the functionality of “No value: What to show when there is no value” → Entered 0.0% which is true in my case.
I run two expressions on the raw results: fill NaNs with 0 and then multiply everything by 100.
In v9 does two expressions seem to fail silently and everything is fine in case of no data. In v11 I get the “attention symbol” next to the panel title I rather not have.
EDIT:
I found a way that works for my specific case: The “attention symbol” did not appear when filling the NaNs but when I multiply by 100 with the math expression (for no-data case). So I have replaced this math expression with a transformation. Now the gauge works as expected. No “Attention Symbol” when there is no data. (I still have to create one panel per gauge like suggested by @ebabeshko