Specifications

CrosstabAvg
654 InfoMaker
Syntax CrosstabAvg ( n {, column, groupvalue } )
Return value Double. Returns the average of the crosstab values returned by expression n for
all the column values or, optionally, for a subset of column values. To return a
decimal datatype, use CrosstabAvgDec.
Usage This function is meaningful only for the average of the values of the expression
in a row in the crosstab. This means you can use it only in the detail band, not
in a header, trailer, or summary band.
Null values are ignored and are not included in the average.
How functions in a crosstab are used When a crosstab is generated from
your definition, the appropriate computed fields are automatically created
using the Crosstab functions. To understand the functions, consider a crosstab
with two columns (year and quarter), a row (product), and the values
expression Avg(amount for crosstab).
The Crosstab Definition dialog box looks like this.
Argument Description
n The number of the crosstab-values expression for which you want
the average of the returned values. The crosstab expression must be
numeric.
column
(optional)
The number of the crosstab column as it is listed in the Columns box
of the Crosstab Definition dialog box for which you want
intermediate calculations.
groupvalue
(optional)
A string whose value controls the grouping for the calculation.
Groupvalue is usually a value from another column in the crosstab.
To specify the current column value in a dynamic crosstab, rather
than a specific value, specify @ plus the column name as a quoted
string.