avg avg

Returns the average value among a set of expressions, given either as a list or two expressions. Null values are ignored.

Category

Aggregation

Function syntax

avg(<parameter>)

Parameters

Supported types:

  • listInteger
  • listDecimal
  • decimal
  • integer

Signatures and returned type

avg(<listInteger>)

avg(<listDecimal>)

avg(<decimal>,<decimal>)

avg(<decimal>,<integer>)

avg(<integer>,<decimal>)

avg(<integer>,<integer>)

Returns a decimal.

Examples

avg(@event{BarBeacon.inventory},5)

avg([10,3,8])

Returns 7.0.

avg(10.2, 3)

Returns 6.6.

recommendation-more-help
b22c9c5d-9208-48f4-b874-1cefb8df4d76