Issue with min - max - mean tasks

Hello @sineverba,
I tried to work with the data on your instance. I think the issue is that the series are the same so they’re over writing each other? I used the set function to change the mean, mix, max values like:

data = from(bucket: "homeassistant-aprilia")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r["entity_id"] == "0x00158d000484fb9a_temperature" or r["entity_id"] == "0x00158d0004a01639_temperature" or r["entity_id"] == "0x00158d00067beedf_temperature")
  |> filter(fn: (r) => r["_field"] == "value")
//   |> yield(name: "raw")
data
    |> aggregateWindow(every: 24h, fn: max, createEmpty: false)
    |> set(key: "_field", value: "max_value")
    |> yield(name: "max")
//     |> to(bucket: "downsample-temperature-aprilia", org: "sineverba")

data
    |> aggregateWindow(every: 24h, fn: min, createEmpty: false)
    |> set(key: "_field", value: "min_value")
    |> yield(name: "min")
//     |> to(bucket: "downsample-temperature-aprilia", org: "sineverba")

data
    |> aggregateWindow(every: 24h, fn: mean, createEmpty: false)
    |> set(key: "_field", value: "mean_value")
    |> yield(name: "mean")
//     |> to(bucket: "downsample-temperature-aprilia", org: "sineverba")

I couldn’t test it with the to function because I don’t have permissions to create new buckets and I didn’t want to write data to another one of your buckets. Lmk if that works and sorry for the delay.
This query is producing 9 series as expected though.

Yes, it seems to work!

Btw, you can use “downsample-temperature-aprilia” bucket, I did create it just to test so you can add so many dirty data you want :wink:

I’ll tell you on next days about it works or no, thank you for the moment!

1 Like

@sineverba yes please let me know if it doesn’t continue to work as expected and I’m sorry for the delay. I appreciate your patience.