|
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 .
|
|
If keyword is ALL, AVG returns one new column, containing a single value (the average of all cells in data).
|
|
If keyword is COL, AVG returns a new column for each input column. Each new column contains one value (the average of all cells in the corresponding input column).
|
|
|
AVG is the same as the MEAN macro function.
|
TEMP = AVG(MERGE(3, 4, 5)) or TEMP = AVG(MERGE(3, 4, 5), ALL)
|
TEMP = AVG(MERGE(-10, 3, 10))Creates a new column named TEMP containing the value 1.
|
TEMP = AVG(V1) Creates a new column named TEMP containing a single value which is the arithmetic mean of the contents of column V1.
|
TEMP = AVG(V1:V3) Creates a new column named TEMP containing a single value which is the arithmetic mean of the contents of columns V1, V2, and V3.
|
TEMP = AVG(V1[10:20]) Creates a new column named TEMP containing a single value which is the arithmetic mean of the cells in rows 10-20 of column V1.
|
TEMP = AVG(V1[1:5]:V4) Creates a new column named TEMP containing a single value which is the arithmetic mean of the cells in rows 1-5 of columns V1 through V4.
|
TEMP = AVG(V1:V3, COL) Creates three new columns named TEMP, VX, and VY. The single value in the TEMP column is the arithmetic mean of the contents of column V1, the single value in the VX column is the arithmetic mean of the contents of column V2, and the single value in the VY column is the arithmetic mean of the contents of column V3.
|
TEMP = AVG(MERGE(1,4), COL) Creates two new columns named TEMP and VX. TEMP contains a single value of one; VX contains a single value of four.
|
TEMP = AVG(V1[1:5]:V3, COL) Creates three new columns named TEMP, VX, and VY, each containing a single value. The value in column TEMP is the arithmetic mean of the cells in rows 1-5 of column V1, the value in column VX is the arithmetic mean of the cells in rows 1-5 of column V2, and the value in column VY is the arithmetic mean of the cells in rows 1-5 of column V3.
|
TEMP = AVG(V1, ROW) Creates a new column named TEMP, containing the same values as column V1 (the arithmetic mean of any number is itself).
|
TEMP = AVG(V1:V3, ROW) Creates a new column named TEMP where each cell entry is the arithmetic mean of the corresponding row across columns V1, V2, and V3.
|
TEMP = AVG(V1[1:5]:V3, ROW) Creates a new column named TEMP, where the cells in rows 1-5 contain the arithmetic mean of the corresponding row across columns V1 through V3. The other cells in TEMP are empty.
|
SUM or TOTAL
|
Copyright IBM Corporation 2013. All Rights Reserved.
|