Dynamic legend values based on data column

I am running Grafana 8.5 . I can upgrade but the question most likely stands for Grafana 9 aswell.

I have a datasource that returns simple data that contains ‘label value’: (I get data from Azure Monitor ):

The clientId field is the one I want my legend labels to be in the series panel .Is not high in cardinality (~15 but varies over time) .

I have seen in Prometheus datasource when multiple labels are returned they are different dataframes in the inspector , in my case it is only one dataframe . I tried to see if there is a transformation to split the dataframe by column into multiple ones just to show the legend values but couldn’t find a way.

Basically I want my data to be seen as different dataframes by the panel based on data column . Is it possible ?

1 Like

My mistake , looks like it was enough to sort the results and return the dataset in this order : timestamp , metricVal, groupedBy . It shows correctly now
image

1 Like