##### Page tree

Contents:

This example demonstrates how the rounding functions work together.

Functions:

ItemDescription
FLOOR Function Computes the largest integer that is not more than the input value. Input can be an Integer, a Decimal, a column reference, or an expression.
CEILING Function Computes the ceiling of a value, which is the smallest integer that is greater than the input value. Input can be an Integer, a Decimal, a column reference, or an expression.
ROUND Function Rounds input value to the nearest integer. Input can be an Integer, a Decimal, a column reference, or an expression. Optional second argument can be used to specify the number of digits to which to round.
MOD Function Returns the modulo value, which is the remainder of dividing the first argument by the second argument. Equivalent to the `%` operator.

Source:

rowNumX
1-2.5
2-1.2
30
41
51.5
62.5
73.9
84
94.1
1011

Transformation:

Transformation Name `New formula` `Single row formula` `FLOOR(X)` `'floorX'`

Transformation Name `New formula` `Single row formula` `CEILING(X)` `'ceilingX'`

Transformation Name `New formula` `Single row formula` `ROUND (X)` `'roundX'`

Transformation Name `New formula` `Single row formula` `(X % 2)` `'modX'`

Results:

rowNumXmodXroundXceilingXfloorX
1-2.5 -2-2-3
2-1.2 -1-1-2
300000
411111
51.5 221
62.5 332
73.9 443
840444
94.1 454
10111111111