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. |
X.5
or more are rounded to X+1
. Numeric literal example:
derive type:single value: ROUND(2.5) |
Output: Generates a column with each row's value 3
.
Expression example:
derive type:single value: ROUND(MyValue + 2.5) |
Output: Generates a column containing the nearest integer to the sum of 2.5 and the value in the MyValue
column.
Numeric literal example:
derive type:single value:ROUND(PI(),4) |
3.1416
.derive type:single value: ROUND(numeric_value, integer_value) |
Argument | Required? | Data Type | Description |
---|---|---|---|
numeric_value | Y | string, decimal, or integer | Name of column or Decimal or Integer literal to apply to the function |
integer_value | N | integer | Number of digits to which to round.
|
Name of the column, numeric literal, or numeric expression.
Required? | Data Type | Example Value |
---|---|---|
Yes | String (column reference) or Integer or Decimal literal | 2.5 |
Number of digits to which to round the first argument of the function.
Usage Notes:
Required? | Data Type | Example Value |
---|---|---|
No | Integer literal | 3 |