Skip to content

AvgX

Iterator

AvgX(table, rowExpr)

Like SumX with AVG: evaluates rowExpr per row and averages. Not additive — YTD(AvgX(…)) is rejected (SQX015); accumulate the parts instead.

  • The average of a computed line value — average line revenue (Qty × Price), average net-of-discount amount.
AvgLineValue := AvgX(Sales, Sales.Qty * Sales.Price)