Sum two column with integer as column tag

Hi,
I cannot sum two column ( 1 and 2)

now I add the map function and sum the column 1 and 2

  |> map(fn: (r) => ({r with _value: r.1 + r.2 }) )

but the result is an error

Could someone help me to fix the error?

best reagards vodet

Hi @vodet and welcome to the InfluxDB forum.

Try adding a |> group() statement in your query just before the |> map statement.