MAX
Syntax
MAX(data [, keyword])
Parameters
data
The numerical values to compute the maximum of. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. For the format definition of data, see the "Macro Function Parameters" section in the chapter in this guide for your IBM® Unica® product.
keyword
This optional keyword determines how the computation is performed over the input data range. Select one of the following:
ALL - Performs the computation on all cells in data (default)
COL - Performs the computation separately for each column of data
ROW - Performs the computation separately for each row of data
For more details on using keywords in IBM® Unica® Campaign, see Format Specifications.
For more details on using keywords in IBM® Unica® PredictiveInsight, see Format Specifications.
*
Many macro functions take the keyword parameters {ALL | COL | ROW}. These keywords do not apply in IBM® Unica® Campaign because the input data is always a single column or field. The macro will always behave as if the COL keyword were specified. Therefore, you do not need to specify these keywords when using IBM® Unica® Campaign.
Description
MAX calculates the maximum of the values in the specified data range. It returns a single new column containing the maximum value.
This macro is available in IBM® Unica® Interact.
Examples
TEMP = MAX(3) or TEMP = MAX(3, ALL)
Creates a new column named TEMP containing the value three.
Creates a new column named TEMP containing a single value which is the maximum of columns V1, V3, and V5.
Creates a new column named TEMP containing a single value which is the maximum value of the contents of column V1.
Creates a new column named TEMP containing a single value which is the maximum of the columns V1, V2, and V3.
Creates a new column named TEMP containing a single value which is the maximum of the cells in rows 10-20 of column V1.
Creates a new column named TEMP containing a single value which is the maximum of the cells in rows 1-5 of columns V1 through V4.
Creates three new columns named TEMP, VX, and VY. The single value in the TEMP column is the maximum of the contents of column V1, the single value in the VX column is the maximum of the contents of column V2, and the single value in the VY column is the maximum of the contents of column V3.
Creates three new columns named TEMP, VX, and VY, each containing a single value. The value in column TEMP is the maximum of the cells in rows 1-5 of column V1, the value in column VX is the maximum of the cells in rows 1-5 of column V2, and the value in column VY is the maximum of the cells in rows 1-5 of column V3.
Creates a new column named TEMP where each cell entry is the maximum of the corresponding row across columns V1, V2, and V3.
Creates a new column named TEMP, where the first 11 cells contain the maximum of the values in rows 10-20 across columns V1 through V3. The other cells in TEMP are empty.
Related Functions
Returns the column index of the n th (first, second, third, etc.) maximum value for each row of the specified column