-
What Grafana version and what operating system are you using?
Grafana v10.0.10 -
What are you trying to achieve?
I lack the terminology to properly explain, so let me use an image to illustrate. Basically, I want the bottom graph to exactly like the top graph. I will try to explain what’s going on below.
These are time-series graphs.
The top graph plots temperatures of two machines chosen from variables ‘MachinoNo’ and ‘MachineNo2’. It uses two identical queries. ‘A’ queries ‘MachineNo’, ‘B’ queries ‘MachineNo2’. The two variables are copies of each other, and contain the exact same list of machines to choose from.
In the bottom graph, I’ve attempted to achieve the same thing in one query, by selecting the two machines from a third variable copy, in-which multi-value selection has been enabled. The result is similar, but instead of two graphs, I get one graph bouncing back and forth between the real temperature values (like some kind of seismic signal). I suppose instead of one column for every original source, each similar “type” have become merged somehow… (In the image I’ve highlight one temperature pair (purple), for a clearer view, but they are all like this)
Is it possible to “untangle” these unfortunate pairs?
Top table is created with two queries like this:
SELECT
time_bucket('20 sec', time) AS time, --timestamp interval
part AS metric, --temperature sensor
AVG(value) --sensor value
FROM temp --temperature database
WHERE
$__timeFilter(time) --selectable time window
AND value <> 0
AND temp.machineno = '$MachineNo' --Query B uses '$MachineNo2'
GROUP BY time, part
ORDER BY time
Bottom table is created with this near identical query:
SELECT
time_bucket('20 sec', time) AS time,
part AS metric, --temperature sensor
AVG(value) --sensor value
FROM temp --temperature database
WHERE
$__timeFilter(time) --selectable time window
AND value <> 0
AND temp.machineno IN ($MultiVariable)
GROUP BY time, part
ORDER BY time
-
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