Grafana Legend for a prometheus query

Hi,
New to Grafana :slight_smile:

I have a query that is running on a prometheus datasource, which is working :slight_smile:

increase(queueSize{partition="$partition"}[60s])

$partition is a variable on the dashboard, so this works well one there is only one partition selected. Where I can have the legend as $partition

Now when I introduce multi select or all, I’ve set the all value to .* so had to change the query to:

increase(queueSize{partition=~"$partition"}[60s])

Which works, but of course the legend name is now displayed for each of them as .*. When I remove the legend value, I see the source. So wanted to know how to get one particular value from the source, in my case looking for the partition value?

Any ideas?