Can't grap data from MS SQL when using COUNT

I’m getting stuck in yet another graphing issue.

Inspired by this post https://localhost:3000/t/creating-stacked-bar-charts-on-grafana-using-data-from-sql-server/8200/5 I’m trying to fetch my data with this query:

SELECT
  $__timeGroup(EPOCH, '24h') as time,
  SHIFTNUMBER as metric,
  count(DATESHORT)
FROM
  RPT_PRODHEADER
WHERE
  EPOCH >= $__unixEpochFrom() AND EPOCH <= $__unixEpochTo()
GROUP BY
  $__timeGroup(EPOCH, '24h'),
  SHIFTNUMBER
ORDER BY 1

The data is looking like this in the DB

image

My whish is to show the number of “DATESHORT” occurrences per “SHIFTNUMBER” by every 24 hours, in either separate or stacked bars.

Any help appreciated.

Best regards Ole

I’m really stuck here! :frowning:

Any help very appreciated, sorry if I’m not allowed to comment on own post to get new attention.

Best regards Ole.