FLOOR macro

The FLOOR macro is available only in Unica Campaign.

Syntax

FLOOR(data)

Parameters

data

The numerical values to compute the floor 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 product.

Description

FLOOR calculates the floor of the values in the specified data range. The floor of a number is the greatest integer less than the number. FLOOR returns one new column for each input column, each containing the floor of numbers in the corresponding input column.

Note: This is the same as the INT macro function.

Examples

TEMP = FLOOR(4.3)

Creates a new column named TEMP containing the value 4.

TEMP = FLOOR(2.9)

Creates a new column named TEMP containing the value -3.

TEMP = FLOOR(V1)

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

TEMP = FLOOR(V1:V3)

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

TEMP = FLOOR(V1[10:20])

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

TEMP = FLOOR(V1[50:99]:V2)

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

Related functions

Function Description
CEILING Computes the ceiling of each value in the specified data range
FRACTION Returns the fractional part of each value in the specified data range
TRUNCATE Returns the non-fractional part of each value in the specified data range