Unable to see metric values as legend in time-series

  • What Grafana version and what operating system are you using?

  • I’m using Grafana v10.4.1 (d94d597d847c05085542c29dfad6b3f469cc77e1)

  • What are you trying to achieve?
    I’m trying to create a time-series visualization panel with and legend to be able to used as clickable filters

  • How are you trying to achieve it?
    Using MSSQL data source to fetch data with the bellow query:

SELECT
  $__timeGroup(UtcDate, '1s') as time,
  COUNT(hash) as value,
  ClientId as metric
FROM
  AqsCscClientSignRequests
WHERE
  Action = 0
  AND
  $__timeFilter(UtcDate)
  AND
  ClientId in ($client)
GROUP BY 
  ClientId, $__timeGroup(UtcDate, '1s')
  • What did you expect to happen?
    I was expecting to have the values of distinct metric as legend options.

Hello @ngmathiou,

Welcome to the forum,

if you where expecting something like this:
image

You can achieve it by using the tag of your measurement:

Where vm_name and host are two tag from my measurement proxmox.
The Last* option you see come from the the legend parameter.

Regards

1 Like

Right above the query you will see a Format drop down, change that to time series like @codi639 has it on screen shot

1 Like

Oh great! Thank you very much that did the trick to get the results I wanted!