I’ve been trying to group data by month and have posted elsewhere but without traction.
Hoping someone here can help me!
Here is what I’ve been running in chronograf using flux:
|> range(start: dashboardTime)
|> filter(fn: ® => …
|> keep(columns: ["_value", “_time”])
|> window(every: 1mo, period: 1mo)
table | _start | _stop | _value
0 | 2019-11-28T00:00:00Z | 2019-12-26T00:00:00Z | 82800
1 | 2019-12-26T00:00:00Z | 2020-01-23T00:00:00Z | 231435
2 | 2020-01-23T00:00:00Z | 2020-02-20T00:00:00Z | 361485
3 | 2020-02-20T00:00:00Z | 2020-02-27T11:30:26.796882252Z | 78480
Is someone able to shed some light on the strange start/stop values - I.e.: why is Jan 23 considered the end of the first month here?
(Same goes for the other periods).
The total is correct when adding up all the tables, but the division/windowing is wrong.
My goal is to have a single table with 4 data points that sums _value by month.