Average Function

  • Updated

Returns the average of a specified field or expression across a collection.

Syntax 1

 

Returns the average of a specified field or expression across a collection.

 

Avg(collection, field)

 

 

Arguments:

 

 

 

collection

Collection - A collection.

 

 

field

Field - The field to average.

Syntax 2

 

Returns the average of a specified field or expression across a collection.

 

Average(collection, expression)

 

 

Arguments:

 

 

 

collection

Collection - A collection.

 

 

expression

Numeric - An expression that resolves to a number.

Syntax 3

 

Returns the average of a specified field or expression across a collection.

 

Avg(collection, field, filter)

 

 

Arguments:

 

 

 

collection

Collection - A collection.

 

 

field

Field - The field to average.

 

 

filter

FilterExpression - Filter criteria.

Syntax 4

 

Returns the average of a specified field or expression across a collection.

 

Average(collection, expression, filter)

 

 

Arguments:

 

 

 

collection

Collection - A collection.

 

 

expression

Numeric - An expression that resolves to a number.

 

 

filter

FilterExpression - Filter criteria.

Remarks

  • Arguments after the collection argument are evaluated in the context of a collection member.
  • Example: Avg(Vehicles, BI_PD.Premium, Year=1999) returns 4096.75.

Was this article helpful?

0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.