Calculate difference between value from different sensors (Different measurement)

Hello everyone,

We are monitoring temperatures through IoT sensor and we are using Graph panel to display them. The data are streamed from InfluxDB every 15 minutes with different timing.
I am wondering if it’s possible to calculate and display directly in Grafana the difference between two temperature/value. The values come from a different measurement.

For instance.
The print screen attached shows the temperature form the Supply air vent and the Return Air vent.
Any chance to display the delta T value = Supply Air temp - Return Air temp?
The value doesn’t have to be displayed on the Graph. It can be displayed on a Singlestat panel.

Thanks!

If the two values are from the same measurement you can subtract them in the query. toggle the display into the mode where it shows the query and use something like

SELECT "fieldA" - "fieldB" AS "whatever" FROM ...

you can also use:

1 Like

Thanks, I came across this solution on the forum. In our case the values come form different measurements.

Hi, What was the your solution to this? I’ve attempted using expr which has failed when calculating a value between two different measures.