Constant variable replace part of a string

I’m trying to apply a constant variable to a query, but the replacement is not working properly, in a case like this:


Grafana doesn’t realize it has to replace it. It just works if I add some character to delimit a start and end, like " ", [[ ]], etc. The documentation says the way to do it would be:

FROM [[$myconstantvar]]

It replaces the value in did, but it doesn’t eliminate those characters, resulting in:

FROM [[myValue]]

When it was supposed to replace for:


Can someone help me, please?