-
What Grafana version and what operating system are you using?
Grafana v12.3.1 (0d1a5b4420) -
What are you trying to achieve?
Display used water in liter as bar graph, and change resolution as timescale schanges -
How are you trying to achieve it?
$__interval_ms is used in the grouping logic -
What happened?
no change when i change resolution of the time scale -
What did you expect to happen?
If there is a grouping showing 3 liter, where there were 3 times 1 liter in the db, it should display the 3 single 1 liter bars when i zoom into that timeframe -
Can you copy/paste the configuration(s) that you are having problems with?
yes -
Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
no -
Did you follow any online instructions? If so, what is the URL?
no, simply used the online definition of what $__interval_ms is…
Add variables | Grafana documentation
This is my sql statement for the time scale
SELECT
ts as time_sec,
sum(val_delta) as Liter
FROM misc.BWT
WHERE ts >= $__unixEpochFrom() * 1000 AND ts <= $__unixEpochTo() * 1000
GROUP BY (ts DIV $__interval_ms)
ts i stored in milliseconds.
The data in the db is a series of entries when 1 liter was used, there is no entry > 1:
this is the result from that timeframe when using “last 6 hours”:
and this is when i zoom in into 30 min… no change in resolution.
In fact…looking via query inspector the $__interval_ms is always 60000.
So there is something i seem to not understand ?


