@Round (Formula Language)

Rounds the designated number to the nearest whole number; if an additional number is specified, it is used as the rounding factor.

Syntax

@Round( number ) @Round( number ; factor )

Parameters

number

Number or number list. Numbers to be rounded.

factor

Number. Optional. The rounding factor to use. For example, if factor is 10, @Round rounds to the nearest number that is a factor of 10. If you don't specify a factor, the number is rounded to the nearest whole number.

Return value

roundedNumber

Number. The value of number, rounded to the specified factor or to the nearest whole number. If number is a list, each number in the list is rounded to the specified factor or to the nearest whole number.

Usage

When using this function with a number list, the list concatenation operator takes precedence over any other operators.

For more information, see "List concatenation operator."

Examples

  1. This example returns 2.
    @Round(2.499)
  2. This example returns 3.
    @Round(2.5)
  3. This example returns 2.
    @Round(1.5)
  4. This example returns 12340 if the number in the field named NumberOfEmployees is 12338.
    @Round(NumberOfEmployees;10)
  5. This example returns 1:3:3:4.
    @Round(1.333:2.897654:3.1:4)
  6. This example returns 4510:45010:450010.
    @Round(4505:45005:450005;10)
  7. This example returns 3.1430E+00 in a number field that has scientific formatting and is set to display four decimal places.
    @Round(3.142857; 0.001)