Calculate difference between two measurements

i would to graph the difference between A and B series in Grafana.

It’s possible?

This is my current chart:

I don’t know about other data sources, but if you are using influx you can use the query
`SELECT mean(“A”)-mean(“B”) FROM “whatever” WHERE $timeFilter GROUP BY time($interval) fill(none)

Use influx.The problem is that the difference should be made between two different measures.


How should the FROM be used?


I don’t think it is possible across measurements. You would have to put both variables in the same measurement.

I haven’t tried this myself, but in theory it’s possible these days with Flux; see
(Flux querying is available via a Grafana plugin)

I’m facing a similar issue, i need to compare 2 times, of different versions, say R1 and R2, and plot the percentage difference in a 3rd column. How can it be done?


After selecting measurmenets A and B, switch panel from Query to Transform. If none were selected find and select “Field From Calculation”. You’ll see your measurements, you can select Calculation: Difference to plot A-B


This is the answer ^^^