Data in table view not displayed in chart view by second RunQuery

  • What Grafana version and what operating system are you using?
    Grafana v11.2.2
  • What are you trying to achieve?
    I try to make a staked Chart with
  • How are you trying to achieve it?
    I have created a query that generates rows from a column and counts the number.
    The whole thing is grouped by CW and year
  • What happened?
    If I display the table when creating the visualization (switch top middle), I see values per week and generated column
    Then deactivate the table view so that the graph is displayed, it only works once. If I press RunQuery, the chart disappears.
    Regardless of whether it is stacked or not.
    if i switch back to table view, all the data is there.
SELECT
  CAST(YEAR(TimeStamp) AS CHAR) AS vYear,
  WEEK(TimeStamp, 1) AS CW_Week,
  COUNT(CASE WHEN Recipe= 'Type1' THEN 1 END) AS Type1,
  COUNT(CASE WHEN Recipe= 'Type2' THEN 1 END) AS Type2
FROM Datenbank_1
WHERE TimeStamp >= now() - Interval 4 week
GROUP BY vYear,CW_Week

result in table looks like this:

Thank you and best regards!