Dashboard Variables not available in value mapping

I was trying to use a defined dashboard variable in value mappings in my stat panel, but it just didn’t work. The name of my variable is ‘operation’, it represents the name of a manufacturing process. Here its value should be ‘OP201’.
My text in value mappings is:

$opeation is good

So in the panel, it should appear as:

OP201 is good

But instead, it appears as:

$opeation is good

However, I read the official documentation of value mapping and it says that value mapping accepts variables, which is pretty confusing.
My Grafana version is 7.3.6, not the latest. I wonder if it is me using variables incorrectly that caused this problem or this is just a function that yet to be added in Grafana. Or would it help if I update my Grafana to the latest version?

1 Like

Hi @ganyao1998 ,

Can you share some more details about your query and what you are trying to achieve? And may I ask: what value mappings documenation are you referring to?

Hi mattabrams, thank you for responding to my question.

Actually I am no longer bothered by this problem since I have met my target by other manners. But if you’re still interested I can sure provide more details.

The configuration page of my dashboard variable is here:

and I wanted to use this variable in my stat panel in value mapping:
value_mapping_page

but instead of quoting the variable, it appears in the panel like this:

$opeation is good
(sorry but I am just a new user so I am not allowed to put more than 2 pics in my post)

And finally, by documentation, I mean this link Configure standard options | Grafana documentation

Again, thank you for replying.

1 Like

Hi ganyao1998, we ran into the same problem. How did you fix yours?

This topic was automatically closed after 365 days. New replies are no longer allowed.