Labelling bar gauge items after using "series to rows" and "sort by" Transform

Operating system: Windows 10 Enterprise
Grafana version: * [v9.2.3]

I am trying to label gauge bar items using properties from the data table, after having applied the "sort

I am trying to do this using the Override > Fields returned by query > Standard options > Display name option.

I started with a bar gauge that was labelled correctly, with mean data, but the items were not sorted by value.

The way that I achieved this correct labelling was by typing “${__field.labels.room} - ${__field.labels.location}” into the Override > Fields returned by query > Standard options > Display name option.

image

I used the “series to rows” and “sort by” transforms to sort the data by value, as recommended in: https://community.grafana.com/t/how-can-i-sort-fields-from-the-same-measurement/72559/10.

I expected the naming schema that I had applied to follow from my previous graph, with the items now sorted by value.

As you can see, the items have been sorted by value but all items are now labelled as the string “${__field.label.room} - ${__field.label.location}”.

Please can someone help me to understand what is going wrong or let me know what I need to type now to have the items labelled by room and location again as before?

Thanks so much in advance for your help! : )