Threshold if Value A Different from B

Hi Everyone

i want to make a threshold based on the different between query A and B, if both are the same should be green, if 1% yellow if more than 2% should be red.

how to achieve this with Grafana 7.5.11

Thanks in advance

I believe the only way to do this is to create a 3rd query that does the math, and then set thresholds on that query only. For example:

You would not be able to turn all 3 values red. Only value “C” as indicated. You could also use value mappings to display 1% or 2% or whatever makes sense to the observer.

the math did the trick and could present the required values. but for some reason the threshold is not working fine for negative values.

Try changing the color for base to red. Also, does a value such as negative 150 appear in the correct color?

that worked at the beginning, but when the value is much higher, sometimes works fine sometimes not. like in this case works fine

but if different is much higher then it is only green .

and here is showing only green