0

I'm hoping to have an aggregate sum for each day. All my searches are suggesting to use

  |> aggregateWindow(every: 1d, fn: sum, createEmpty: false)

However, this appears to be more of a group by 24h blocks starting from now rather than grouping by Date. This appears evident by crossing over midnight and the new date having significant values even though it only has reports of 0 so far. ie: it's reporting the last 24h and stealing from the prior day rather then just using what is under the new Date.

Bill Tarbell
  • 4,933
  • 2
  • 32
  • 52
  • Here you're https://docs.influxdata.com/influxdb/cloud/query-data/flux/window-aggregate/ you should try to use `|> window(every: 1d)` and then do your aggregation with `|> sum()` – Amerousful Jul 10 '23 at 21:42

1 Answers1

0

I was able to resolve the issue by pasting this to the above my query. My data is stored as UTC and this applied it to my current time zone.

import "timezone"
option location = timezone.location(name: "America/New_York")
Bill Tarbell
  • 4,933
  • 2
  • 32
  • 52