Hello, trying to sum 2 sums in flux and it just not work
Individual values are working just fine but I did not find the way how to sum two function (reject and pass) in flux like that
result = reject + pass
See below my custom functions to calculate individual values
countqty = (counttrigtag) =>
from(bucket: “dbase1”)
|> range($range)
|> filter(fn: (r) =>
r._measurement == “quantity” and r.counttrigtag == counttrigtag and r._field == “countfield”)
|> sum(column: “_value”)countyel = (lighttrigtag) =>
from(bucket: “dbase1”)
|> range($range)
|> filter(fn: (r) =>
r._measurement == “interval” and r.lighttrigtag == lighttrigtag and r._field == “lightfield”)
|> count(column: “_value”)reject = countqty(counttrigtag: “reject”)
pass = countyel(lighttrigtag: “yellow”)