{{sidenavigation.sidenavigationExpandLabel}}
{{getMsg('Help_YouAreHere')}}: {{page.title}} {{page.title}}
{{$root.getMsg("downLoadHelpAsPdf")}} {{helpModel.downloadHelpPdfDataStatus}}

Average

Returns the average value of a field or an array.
You can also provide a field to group the values of the field (fld).

Usage:

Average( fld )
Average( fld, condFld )
Average( fld, condFld, cond )
Average( array )

Parameters:

fld The name of a field whose values should be used to calculate the average value.
condFld The name of the field that groups the values of fld (if fld isn't an array).
cond A string declaring the type of grouping to be used on condFld. This only makes sense for groups based on Date, DateTime, Time, and Boolean fields. See Summary Field Conditions for a list of strings you can use here.
array The name of an array variable whose values should be used to calculate the average value.

Returns:

A number.

Examples:

//computes the average of the values of a field "production" of table "factory"
average({factory.production})
//computes the average of the array values
average([1,2,3,4,5,6])	//returns 3.5
//computes the average of the return value (an array) of the formula field "makeArray"
average({@makeArray})
//computes the average of the sales amount of all vendors grouped by vendor
average({Sales.Sale_Amount},{Vendors.VendorID})

Notes:

  • If the values in fld should be grouped, a group based on condFld is needed. If the group does not exist in the report, you can add it using i-net Designer or using API method: Engine.addGroup.
i-net Clear Reports
This application uses cookies to allow login. By continuing to use this application, you agree to the use of cookies.


Help - Average