Reputation: 62
How to filter data with 1d interval. I'm trying to create bar chart with my PV system production and I need last value of day_kWh field over past 7 days. e.g:
So far my code looks like this:
from(bucket: "GrowattBucket")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "Growatt 4000TL3-S")
|> filter(fn: (r) => r["_field"] == "day_kWh")
Upvotes: 0
Views: 663
Reputation: 2545
I can't check with your data... but try this:
|> aggregateWindow(every: 1d, fn: last)
Upvotes: 1