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.
When to use it
Section titled “When to use it”- The average of a computed line value — average line revenue (
Qty × Price), average net-of-discount amount.
Example
Section titled “Example”AvgLineValue := AvgX(Sales, Sales.Qty * Sales.Price)