Ceiling (Expression Function)

Purpose

The Ceiling function (CEILING) rounds a number up to the nearest multiple of a certain other number.

Parameters

The Ceiling function has two parameters, one of which:

Value

Allowed Inputs: field value or number

The first required parameter is the number that will be rounded up. Either use the use the Query Builder to choose a field that contains the value or use type a value to enter a number.

Step

Allowed Inputs: field value or a number

The second optional parameter of the Ceiling function is the number that represents the multiple that the value will be rounded up to. If no value is provided then 1 will be used and the value will be rounded up to the nearest integer value. 0 is an illegal value for the step. Either use the query builder or the type a value option to enter a number.

Output

The output of the Ceiling function is a number representing the value rounded up to the nearest multiple of the step value. Positive numbers will round away from zero and negative numbers will round towards zero.

Example

For example CEILING(-5.33,1) would result in -5 and CEILING(5.33,1) will result in 6. The step does not have to be in whole integer increments for example CEILING(5.33,.5) would result in 5.5. The step can also be larger than single digits for example CEILING(15.33, 10) would result in 20.

expression function - ceiling.txt · Last modified: 2016/09/14 18:19 (external edit)
Copyright WorkXpress, 2024