Display difference of (subtracted) 2 series "on the fly"

Hello @loeten,
I think this would be easier with Flux…but let’s dust off some InfluxQL.

SELECT "T" - "W" FROM (SELECT mean(“Temperatur”) AS "T", mean("Wetness") AS "W" FROM “M41” WHERE (“Sensor” = ‘Beet’) AND AND time >= 'start' AND time <= 'end' GROUP BY time(10m) fill(previous))

I’m using this as a reference:

And I’m grouping by time and applying the mean to get the timestamps to line up. You could use whatever aggregation function you want though.

In Flux you have many more options available to you though…tons of functions to manipulate time with: Query Group by time ( Shift time) - #2 by Anaisdg