ABS macro

The ABS macro is available only in Unica Campaign.

Syntax

ABS(data)

Parameters

data

The numerical values for which to compute the absolute value. This parameter can be a constant value, a column, a cell range, or an expression that evaluates to any of these types. For the format definition of data, see the "Macro Function Parameters" section in the chapter in this guide for your product.

ABS calculates the absolute value of the numbers in the specified data range. The absolute value of a number is its value without its sign (that is, positive numbers are unchanged; negative numbers are returned as positive numbers). ABS returns one new column for each input column, each containing the absolute value of numbers in the corresponding input column.

Examples

TEMP = ABS(-3) or TEMP = ABS(3)

Creates a column named TEMP containing the value 3.

TEMP = ABS(V1)

Creates a column named TEMP, where each value is the absolute value of the contents of column V1.

TEMP = ABS(V1:V3)

Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the absolute values of the contents of column V1, the values of the VX column are the absolute values of the contents of column V2, and the values of the VY column are the absolute values of the contents of column V3.

TEMP = ABS(V1[10:20])

Creates a column named TEMP, where the first 11 cells contain the absolute values of the values in rows 10-20 of column V1. The other cells in TEMP are empty.

TEMP = ABS(V1[1:5]:V2)

Creates two new columns named TEMP and VX, each with values in rows 1-5 (the other cells are empty). The values in column TEMP are the absolute values of the corresponding rows of column V1, and the values in column VX are the absolute values of the corresponding rows of column V2.

Related functions

Function Description
SIGN Computes the sign (positive or negative) of the values in the specified data range.