I’m using a colleagues query to convert power data into kwh/d and display in a bar chart, and pasting this into the grafana editor, the preview chart works fine;
SELECT integral("usage",1h) FROM "one_year"."downsampled_iot" WHERE $timeFilter GROUP BY time(1d)
However, if I toggle the grafana editor back to the graphical interface, the chart data becomes skewed.
If I then toggle the editor back again, I see that the query has been changed by grafana to;
SELECT integral("usage") FROM "one_year"."downsampled_iot" WHERE $timeFilter GROUP BY time(1d)
i.e. grafana has changed (“usage”,1h) to (“usage”) which explains the skewed chart data.
Any advice would be appreciated how to rectify this issue.