InfluxDB AggregateWindow - put value to middle of window

Hi,
I have a query, that shows some data from aggregated windows (24h). One value is a maximum Energy value, that should be shown from the beginning of the day, the other value Temp (mean, max, min) should be shown in the diagram at 12:00. When using the offset function, the result of the mean value is aligned correctly, but the value is of course wrong. Is there a way to shift the mean value without the offset to the middle of the window?

Here’s the query

from(bucket: "myBucket")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r["_field"] == "Energy")
  |> aggregateWindow(every: 24h, fn: max, createEmpty: false)
  |> yield(name: "max Energie")
from(bucket: "myBucket")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r["_field"] == "Temp")
  |> aggregateWindow(every: 24h, fn: max, createEmpty: false)
  |> yield(name: "mean")
from(bucket: "myBucket")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r["_field"] == "Temp")
  |> aggregateWindow(every: 24h, fn: max, createEmpty: false)
  |> yield(name: "max")
from(bucket: "myBucket")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r["_field"] == "Temp")
  |> aggregateWindow(every: 24h, fn: max, createEmpty: false)
  |> yield(name: "min")

Thank you for your help!

Hello @ppreininger,
Perhaps you want to use the timeShift function in conjuction?

Thanks!