Hello
Real n00b in Flux, so I would appreciate some directions on how to properly use histogram to bin data per day (distinct values).
My query is current the following:
from(bucket: “homeassistant”)
|> range(start: -365d)
|> filter(fn: (r) => r[“_field”] == “MY_FIELD”)
|> filter(fn: (r) => r[“_measurement”] == “units”)
|> filter(fn: (r) => r[“domain”] == “sensor”)
|> filter(fn: (r) => r[“entity_id”] == “MY_SENSOR”)
|> filter(fn: (r) => r[“_value”] == “XPTO”)
|> keep(columns: [“_time”, “_value”])
Time format is 2022-10-30 10:00:00.
Thanks,
anthonws.