$__timeGroup doesn't work correct. Grafana v8.2.6

we are back to zero, your time stamp is not UTC

Let me try to spin a db with your sample data and see what I can get

1 Like

oops mislead you with some data part with the new york tag would should have been new_york :slightly_frowning_face: sorry

you might also need to do this since you are on an older version of grafana ( I would highly recommend upgrading)


select time, 
count(opened_defect) as opened_defect, 
count(verified_defect) as verified_defect,
count(in_progress) as in_progress,
count(in_grooming) as in_grooming,
count(closed_defect) as closed_defect
 from (
convert_tz(STR_TO_DATE(DATE_FORMAT(created, '%Y-%m-01'), '%Y-%m-%d'),'America/New_York','UTC') as time,
CASE WHEN status = 'Opened' THEN 1 ELSE NULL END AS opened_defect,
CASE WHEN status = 'Verified' THEN 1 ELSE NULL END AS verified_defect,
CASE WHEN status = 'In Progress' THEN 1 ELSE NULL END AS in_progress,
CASE WHEN status = 'In Grooming' THEN 1 ELSE NULL END AS in_grooming,
CASE WHEN status = 'Closed' THEN 1 ELSE NULL END AS closed_defect
WHERE labels LIKE '%prod_defect%'
) a
group by time
order by time
1 Like

Thank you! will try one more time. What is the stable version of Grafana you recommend? I have 8.2.6

1 Like

I would go with 10

1 Like