Grafana Threashold Based on the value of Another Query

Hai,

I am Using influxdb database, I need to give different colour indication for the value from query “A” based on the Value from Query “B” as a threshold

Are you using Flux or InfluxQL? Can you share your current query(ies) and screenshots showing what you have tried so far?

I am Using InfluxQL,
Yes, my Query will be like
A = SELECT last(“value”) FROM “autogen”.“v” WHERE (“p” = ‘P1’ AND “b”::tag = ‘B1’ AND “d”::tag = ‘D1’ AND “f”::tag = ‘Test’) AND $timeFilter GROUP BY time(5m), “d”::tag, “f”::tag fill(0)

B = SELECT last(“value”) FROM “autogen”.“wind” WHERE (“p” = ‘P1’ AND “bt”::tag = ‘B2’ AND “d”::tag = ‘D2’ AND “f”::tag = ‘Test1’) AND $timeFilter GROUP BY time(5m), “d”::tag, “f”::tag fill(0)

The result of these 2 queries will be a number like A=3, B=5.

I am Trying to set colour for A as red, when the value of B is less 2.

Thanks for explaining. I do not know of a way to set the color of one query where that color is defined by the value in another query. Perhaps @mikhailvolkov might have a rabbit that he can pull out of his hat to solve this one?