How to show the values of 2 template variables combined with "_"


I would like to show 2 template variables combined with “_” in panels.

I defined 2 template variables:
$template_variable_A = valueA
$template_variable_B = valueB

I set $template_variable_A_$template_variable_B in panel config.
I expect valueA_valueB is shown in panels. But grafana shows $template_variable_A_valueB.

Is there any workaround to show as I expected?


If you define a third template variable of type constant and try to combine your two other template variables there, will that work?

Another possible solution may be the other supported format for referencing template variables [[varname]], i.e. [[template_variable_A]]_[[template_variable_B]]


1 Like

@genzo0101 Did you get this to work(maybe workaround)? I’m having the same requirement and facing the same problem.