Reference > Expressions > Built-in Functions > Numeric and Currency Functions > Round

Round

Rounds a value to the number of decimal places specified. Returns the integer nearest the value parameter. If the fractional component of the value parameter is halfway between two integers, one of which is even and the other odd, then this function returns the even number. This is called banker's rounding and it minimizes rounding errors that result from consistently rounding a midpoint value in a single direction.

Syntax

Round(value, places)

Enabled for

Search/Dashboard No
Business Rules Yes
Quick Actions Yes
Workflow Objects Yes
Reports No

Parameters

value Numeric or currency value to round.
places (Optional) The number of decimal places to round the value to. Must be a non-negative integer. The default is 0.

Return Value

The same type as the value parameter type. If the value parameter is a currency value, this function returns a currency value. If the value parameter is a number value, this function returns a number value. If the value parameter is not a number nor a currency, returns an error.

Examples

$(Round(2.12345,2))

The above example returns a value of 2.12. Rounds down and to 2 places.

 

$(Round(2.12789,2))

The above example returns a value of 2.13.  Rounds up and to 2 places.

 

$(Round(2.125))

The above example returns a value of 2.12. The number to round, 2.125, is halfway between two integers (2.12 and 2.13) so this function rounds to the even number (2.12).

 

$(Round(2.135))

The above example returns a value of 2.14.  Rounds up.

 

$(Round(2.125USD,2))

The above example returns a value of 2.12USD.  The number to round, 2.125, is halfway between two integers (2.12 and 2.13) so this function rounds to the even number (2.12). It also includes the currency value (USD).