Specifications
CHAPTER 24 DataWindow Expression and InfoMaker Functions
Users Guide 657
Consider a crosstab that has two columns (region and city) and the values
expression Avg(sales for crosstab). This expression for a computed field in the
detail band computes the average sales over all the cities in a region:
CrosstabAvg(1, 2, "@region")
This expression for another computed field in the same crosstab computes the
grand average over all the cities:
CrosstabAvg(1)
See also CrosstabAvgDec
CrosstabCount
CrosstabMax
CrosstabMin
CrosstabSum
CrosstabAvgDec
Description Calculates the average of the values returned by an expression in the values list
of the crosstab and returns a result with the decimal datatype. When the
crosstab definition has more than one column,
CrosstabAvgDec can also
calculate averages of the expression’s values for groups of column values.
For crosstabs only
You can use this function only in a crosstab report.
Syntax CrosstabAvgDec ( n {, column, groupvalue } )
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.