Can I use column value from mysql query as panel title?

Hi everyone! I am trying to create dashboard with some number of gauge panels and I want to be able differ one from another. :slight_smile: I created variable with default value and I can see this default value in panel title. But how can I assign to this variable non-default value from mysql query result?

Choose query then choose mysql data source then add your query with the column you that contains the values you want.

And how value from this column goes to variable and then to panel title?

See this example. The 3rd panel title is dynamic

https://play.grafana.org/d/000000056/templated-dynamic-dashboard?orgId=1&var-app=fakesite&var-server=web_server_02&var-interval=10m

It uses variable name
$server

Not clear. Assume I have gauge for some row with id=42, that rendered by some mysql query with joins. Then I want to have two more gauges, I duplicate them and change id to 69 and 100 for example.
I think you meant this query: https://i.imgur.com/oEpDAam.png and I don’t think that hardcode ids in the second place is a good idea. Or you meant something different?
Or assume I write in variable query something with joins that concat readable string that I with to have at panel title. This query returns several rows. How this rows mapped to panels?

Looks like variables is not what I need. Is any other way to generate panel title, except variables? Maybe just a way to specify alias from mysql query?

So is your question about title or gauge? I am a bit lost

Does panel type matters? My question about duplicating panels when required and changing single value in where condition in raw sql query, without typing in human readable description to which entity this panel related. Because raw sql query can concatenate this information from couple joins. Maybe it is not title, but “Display name” field. I tried ${__series.name} but result looks weird, like https://i.imgur.com/LMVyeXf.png

gotcha. please post sample data or select statement here

time,metric,value
2020-06-30 13:00:00,heat,78.3

or

select '2020-06-30 13:00:00' as time ,'heat' as metric,78.3 as value
union
select '2020-06-30 13:00:00' as time ,'humidity' as metric,13as value

So you want to change the Gauge Panel Title?

or dynamically repeating panels?