Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space DEV and version next

...

  • 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.

D s
 

D s
snippetBasic

Numeric literal example:

ROUND
d-codelang-syntax
RawWrangletrue
Typeref
showNotetrue
WrangleTextderive type:single value:
round(2.5)

round(2.5)

Output: Generates a column with each row's value  Rounds the input value to the nearest integer: 3.

Expression example:

ROUND
d-code-lang-syntax
RawWrangletrue
Typeref
showNotetrue
WrangleTextderive type:single value:
round(MyValue + 2.5)

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:

ROUND(PI
d-codelang-syntax
RawWrangletrue
Typeref
showNotetrue
WrangleTextderive type:single value:
round(pi(),4)

round(pi(),4)

Output: Generates a column containing Rounds pi rounded to four decimal points: 3.1416.

D s
snippetSyntax

ROUND
d-code-lang-syntax
RawWrangletrue
Typesyntax
showNotetrue
WrangleTextderive type:single value:
round(numeric_value, integer_value)

round(numeric_value, integer_value)

...