Grouping data with slightly different timestamp

Hi, I’m using Grafana v10.2.3 on Raspbian. I’m collecting monthly sums from various energy counters in an InfluxDB. These values should be grouped by month, but it seems that timestamps differ by milliseconds, so these are considered separate points in time:

The three bars on the left are from January first while the three (or rather four) on the right are from February first:

Any idea how I can make Grafana neglect those milliseconds? I read about plugins like groupedbarchart, but was unable to install and I’m unsure if they’re still valid for recent Grafana versions.

Check this out

data
    |> truncateTimeColumn(unit: 1m)

Pretty sure that @luas is using InfluxQL.

Grouping by month is not possible using InfluxQL. More in the final table of this blog.

Sorry for being unprecise there. I can’t even tell… but this is what my query looks like:

@grant2 Regarding your blog, wouldn’t it be sufficient to group by day? There are only datapoints for January 1st, February 1st and so on.

Sure. In fact, if you follow one of the links in the blogs, you can see a bunch of InfluxQL queries, including one that sums Demand by day:

SELECT sum("value") FROM "ElectricPowerOperations" WHERE ("type"::tag = 'Demand' AND "region"::tag =~ /^$region$/) AND $timeFilter GROUP BY region, time(1d)

Thanks @grant2 !
It turns out that grouping by day leaves me with a lot of empty days…

…while grouping by 30 days feels a bit dirty, but brings up what I was hoping for. So what :smile:

Thank you!

Scary to realize flux will be in maintenance mode and move to influxql with no matching powerful functions in influxql

Maybe they are working on it