Hey All,
I have a table as below:
CREATE TABLE `priority` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`priority` int(3) NOT NULL,
`count` int(11) NOT NULL,
`group_name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`day_opened` DATETIME NOT NULL
PRIMARY KEY (`id`)
)
Basically im trying to do a stacked bar chart, it should group everything by month(day_opened) and then stack everything in the month by priority but show the count.
I setup multiple queries, one for each priority, thinking it should stack anything that is in the same month e.g. June.
SELECT
day_opened AS "time",
MONTHNAME(day_opened) AS "metric",
sum(inc_count) AS "P2"
FROM inc_priority
WHERE
$__timeFilter(day_opened) and
group_name = "TheTeam" and
priority = "1"
GROUP BY queue_name
ORDER BY day_opened
so far all i get is two columns with June on the X Axis and the count on the Y Axis, but they arent stacking even though i have stack enabled in grafana.
I have spend ages searching and so far cant find anything that will work for this.