...
- When rounding to nearest integer, decimal values that are
X.5
or more are rounded to X+1
.
Info |
---|
NOTE: This function changes the actual data of the value. If you just want to change how the data is formatted for display, please use the NUMFORMAT function. See NUMFORMAT Function. |
Numeric literal example:
d-codelang-syntax |
---|
RawWrangle | true |
---|
Type | ref |
---|
showNote | true |
---|
WrangleText | derive type:single value: |
---|
| ROUND |
round(2.5) |
Output: Generates a column with each row's value Rounds the input value to the nearest integer: 3
.
Expression example:
d-code-lang-syntax |
---|
RawWrangle | true |
---|
Type | ref |
---|
showNote | true |
---|
WrangleText | derive type:single value: |
---|
| ROUND |
round(MyValue + 2.5) |
Output:
...
Rounds to the nearest integer
...
the sum of 2.5 and the value in the MyValue
column.
Numeric literal example:
d-codelang-syntax |
---|
RawWrangle | true |
---|
Type | ref |
---|
showNote | true |
---|
WrangleText | derive type:single value: |
---|
| ROUND(PI |
round(pi(),4) |
Output: Generates a column containing Rounds pi rounded to four decimal points: 3.1416
.
d-code-lang-syntax |
---|
RawWrangle | true |
---|
Type | syntax |
---|
showNote | true |
---|
WrangleText | derive type:single value: |
---|
| ROUNDround(numeric_value, integer_value) |
|
round(numeric_value, integer_value) |
...