Title variable dependent on another variable does not update for repeating panel

I am using Grafana to display network utilization graphs. Each graph has a throughput data (octets in and and out) and discards as values, as well as 3 tags: hostname (device hostname), interface (interface name, i.e. Gi1) and alias (interface description, i.e. “link_to_vpn”).

All 3 tags are set as variables. Here’s the query for alias variable: SHOW TAG VALUES FROM “network.spectrum” WITH KEY = “ifAlias” WHERE (hostname =~ /$Hostname/ AND interface =~ /$Interface/)

Here’s how I am querying for data (not sure if that’s necessary, but can’t hurt I guess): SELECT non_negative_derivative(mean(“ifHCInOctets”), 1s) * 8 / 1024 / 1024 AS “mbps_in”, non_negative_derivative(mean(“ifHCOutOctets”), 1s) * 8 / 1024 / 1024 AS “mbps_out”, non_negative_derivative(mean(“ifInDiscards”), 1s) AS “discards_in”, non_negative_derivative(mean(“ifOutDiscards”), 1s) AS “discards_out” FROM “network.spectrum” WHERE (“hostname” =~ /^Hostname/ AND “interface” =~ /^Interface/) AND timeFilter GROUP BY time(__interval) fill(null)

The panel title is set as Interface $Interface $Alias. This panel is also configured to repeat itself by the Interface.

Here’s the problem: if I go to the dashboard and select individual interface, then I see 1 graph which has correct values for $Interface and $Alias displayed. However, if I select “All” for the interfaces, I correctly see multiple graphs, each graph has correct data for $Interface value, however $Alias is the same for all the graphs and is incorrect (well, it’s correct for one of them I guess).

How do I get correct values for $Alias for each of the panels?

My data structure is not set in stone, it can be changed as needed. I am not sure if using a variable that references a tag is the right option or if there are better ways of doing it. Any suggestions would be highly appreciated!

I was able to get closer to my goal by adding GROUP BY tag(ifAlias) in my query and then referencing it with $tag_ifAlias in the ALIAS BY field. This gives me the interface description for the graph lines. I still can not figure out how to add it to the panel title unfortunately…