HI,

I have this TICK script:

var data = stream

|from()

.database(‘counters’)

.retentionPolicy(‘autogen’)

.measurement(‘DataCounters’)

.groupBy(*)

|window()

.periodCount(2)

.everyCount(1)

var InOctets = data

|where(lambda: isPresent(“InOctets”))

|derivative(‘InOctets’)

.nonNegative()

.as(‘InOctets’)

|eval(

lambda: “InOctets”)

.as(‘calc_InOctets’)

var OutOctets = data

|where(lambda: isPresent(“OutOctets”))

|derivative(‘OutOctets’)

.nonNegative()

.as(‘OutOctets’)

|eval(

lambda: “OutOctets”)

.as(‘calc_OutOctets’)

InOctets

|union(OutOctets)

|eval(

lambda: if(“calc_InOctets” > 0, 100.0 / “calc_InOctets”, 0.0))

.as(‘calc_NormalizedBandwidth’)

.keep(‘calc_OutOctets’)

|influxDBOut()

.database(‘counters’)

.retentionPolicy(‘calc_rp’)

.measurement(‘DataCounters’)

.precision(‘ms’)

.flushInterval(5s)

and I got every time this error: rr=“Failed to handle 2 argument: invalid math operator / for type missing”.

without the evalNode the Kapacitor saves the right data on influx as expect.

what can be the problem with my TICK script? how I can access to the field after the union?