Range() not working

When changing range(start: -1h) to range(start: -7d), the results from the past 1 hour are not shown in the results for the past 7 days. What could be causing this?

from(bucket: “mybucket”)

|> range(start: -1h)

|> filter(fn: (r) => r["_measurement"] == “Monitoring”)

|> filter(fn: (r) => r[“OEM”] == “99000”)

|> filter(fn: (r) => r["_field"] == “filling”)

|> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)

|> yield(name: “mean”)

I’m running influxdb:2.0.4 in a docker container.

Are you after aggregates per hour, over the selected time period? If so you need to change the every clause to 1h.