Change legend text based on totally different field

I am using a Bar Gauge with reducer function Last*

I am receiving two fields:

top_score 5690
top_user{name=“tom”} 1

The bar correctly always shows the top_score, but I would like the Legend to be the name of the user - i.e. Tom.

If I pass the name attribute in the top_score field, I end up with multiple bars, as every time the top scoring user changes, it makes a new bar.

How to do it?

I’m guessing you are using prometheus? Can you share a snipped of what those two rows look like as raw, unformatted data?