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â)