Hi,

I have this base query:

```
from(bucket: "bucket")
|> range(start: v.timeRangeStart, stop:v.timeRangeStop)
|> filter(fn: (r) =>
r._measurement == "Power" and
r._field == "value" and
r.device == "device1"
)
|> aggregateWindow(every: v.windowPeriod, fn: max)
|> map(fn: (r) => ({ _value:r._value, _time:r._time, _field:"Power (W)" }))
```

This returns the power for “device1”. I need to expand this and calculate the sum of multiple devices, for example “device1” + “device2” + “device3”.

For example, let’s say I execute this query 3 times but change “device1” each time. The results are the following:

device1: 50.15

device2: 18.00

device3: 0.1

The desired result would be 68.25

This seems like it should be very simple but I tried numerous things but so far could not come up with a solution that works.

Thanks!