I have one graph with 3 data points from InfluxDB, on same dashboard I have 3 Singlestat showing one each of the 3 points.
If I have Last 3 hours of less it works perfect, but as soon as I choose Last 6 hours or higher current value in Singlestat is wrong.
Anyone that can confirm this?
RPi 3, version 4.3.2
What does your InfluxDB query look like and what does it return, what are you single Stat options?
It will show what you query returns (current, avg or total etc, depending on single state option)
So make sure your singlestat influxdb query only returns one data point and that it is the last.
Thanks Torkel
I can check later today what it returns.
For both Singlestat and Graph I have choosen Current
It works correct when I have last 5 min, 30 min up to last 3 hours, but when I choose last 6 hours, last 2 days and higher, Singlestat gives wrong value, at the same time Graphs gives correct Current(last value)
I am new to Grafana, only used it for 6 days.
Torkel, I found the error.
The query was mean(), after I changed it to last() it works like I want.
query that not giving last value
SELECT mean(“value”) FROM “Instant” WHERE “name” = ‘Panna_V’ AND $timeFilter GROUP BY time($interval) fill(null)
query that gives last value
SELECT last(“value”) FROM “Instant” WHERE “name” = ‘Panna_V’ AND $timeFilter GROUP BY time($interval) fill(null)