Dont calc the total in Stat panel


I´m using a Stat field, but how I can calc the total consumption from start to stop?:

import "timezone"
import "date"
option location = timezone.location(name: "Europe/Vienna")

from(bucket: "Heizung")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r["_measurement"] == "Haus")
  |> filter(fn: (r) => r["Bereich"] == "Alles")
  |> filter(fn: (r) => r["_field"] == "Bedarf")
  |> aggregateWindow(every: 1h, fn: mean, createEmpty: true)
  |> yield(name: "mean")

When I aggregate the values as hour, then it seems correct.
Of course, because then he has for each hour a value as kWh.

But can Grafana not calc the total based on time?