Extend value from outside time range?


I’ve got a dashboard where im plotting temperatures and fan speed. The temperatures change pretty often while the fan speeds can stay constand for an entire day.

The problem is I want to have a time range of say 3h, but then I get “No data” in the graph of fan speeds.

How can I extend the last value of fan speeds from outside the time range?

SELECT last("value") FROM "mqtt_consumer" WHERE ("topic" = '2._etg/Ventilasjon/Viftehastighet_tilluft') AND $timeFilter GROUP BY time(10s) fill(previous)

You can’t display data which does not exist in the time range of your database

You have to have fan speed data in the database for the time range you want to
display. I suggest sampling fan speed and temperature at the same intervals.


Thanks, thats a clear answer.

I’ll have to look in to my data collection. Its currently logging every change. That could mean multiple times a minute for temperature sensors and every other day for fan speed.

I have the same problem. I’m graphing the temperature and the setpoint.
The setpoint is currently only stored when it is set.
I will now inject the setpoint value regularly; each time the temperature changes is wasteful, but I’ll do it every 5 minutes; I will not need to zoom further in.