ROUND
- ROUND(value)[source]
Rounds a number or array of numbers to the nearest integer.
The ROUND function evaluates the input value and returns the closest integer. If an array of numbers is provided, each element is rounded individually. If the input is blank or in an error state, the formula evaluates to an error.
- Parameters:
value (
Operand|float) – The number or array of numbers to round. If blank or in an error state, the formula will evaluate to an error.- Returns:
scalar input returns a single integer, array input returns an integer array.
- Return type:
- Raises:
ValueError – If value is not of type DECIMAL or DECIMAL_ARRAY.
Examples
Rounding a single value:
ROUND(3.6) # Returns 4
Rounding an array of values:
ROUND([1.2, 3.7, 4.5]) # Returns [1, 4, 5]
``value`` — accepted types
DECIMAL
DECIMAL_ARRAY
Return types
INTEGER
INTEGER_ARRAY