Using a dashboard variable in a query

I’m trying to use a simple influx variable in my query which allows for user input to my dashboard.

Consider a simple mapped variable called “threshold”:

high,"3.0"
low,"2.0"
mid,"2.5"

Now, the question is how do I use this map in my query? I’ve tried:

v.threshold

have considered using “dict” and dict.get but not sure where I get key? My goal is for user to select high, medium, or low and for v.threshold to pass the corresponding float value to my query.

Am now thinking the right approach is to use float(v: v.threshold) to pass my float value.

Hello @leeprevost,
Thank you for sharing your solution!!