Link threshold to variable

Hi everyone,

just a short question. Is there any way to use grafana variables as a threshold?
Example:
I got a 3 variable with var1: Threshold1 containing: 0,100,200,300
var2: Threshold2 containing: 400,500,600,700
var3: Threshold3 containing: 800,900,1000,1100

Inside my GrafanCloud v.8.5.2 on my Linux machine i tried this:
grafik

but i wont work for me.

Greetings
Graf

1 Like

Does this comment from Torkel in this Grafana Issue thread help fix your issue?

I was trying to do something very similar, and it helped me get where I wanted

@samjewell I can’t quite figure out how to do this for multiple variables

I had my variables are defined as part of the dashboard. Then following the same linked github comment I was able to make a few variables like this:

Then I add another query to the visualisation:

Which I can add a config transformation for.
But I’m not sure how to do multiple variables. Because If I was to add a query for each threshold variable I would need to have a transformation for each of them. But each threshold overwrites the last and I can’t figure out how to assign multiple threshold variables at once (in the one transformation).

Can I create multiple rows from multiple variables in one PromQL query?
Can I stop proceeding config transformations from overwriting unedited threshold values?