'Grafana stacking multiple bars in bar chart by specific column
I have these bars with the query within the picture.
SELECT
area,
SUM(case when report_date = '2022-04-18' then volume else 0 end ) AS "22-04-18 Volume",
SUM(case when report_date = '2022-04-25' then volume else 0 end ) AS "22-04-25 Volume",
SUM(case when report_date = '2022-04-18' then sales else 0 end ) AS "22-04-18 Sales",
SUM(case when report_date = '2022-04-25' then sales else 0 end ) AS "22-04-25 Sales"
FROM test
WHERE (report_date = '2022-04-18'
OR report_date = '2022-04-25')
GROUP BY area
I want to stack the bars stacked on each other volume from one week + volume from other week, sales from one week + sales from other week by area but I get this:
Is there a way to accomplish this? Table below:
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|