Hey,
i calculate a value into a new column and try to round up the calculated value.
I tried the math.ceil() function but i always get an error “missing pipe Argument”
Is there another way to get the rounded up value?
My Query is the following:
import “math”
from(bucket: “zone/autogen”)
|> range(start: 2021-01-01T00:00:00Z)
|> filter(fn: (r) =>
r._measurement == "Measurement2"
)
|> pivot(
rowKey:["_time"],
columnKey: ["short","_field"],
valueColumn: "_value"
)
|> filter(fn: (r) =>
r.articlenumber < "2500000000" or
r.articlenumber > "5000000000"
)
|>group(columns:[“day”,“week”])
|>sum(column:“orderQuantity”)
|> map(fn: (r) => ({ r with
neededmachines: float(v: r.orderQuantity)/6000.0
}))
|>group()
|>math.ceil(x:“neededmachines”)
Thank you for your help in advance