ROUND function

This topic describes the formula syntax and usage of the ROUND function in the Data Quality Execute Formula transform.

Description

Rounds a number to a specified number of digits. This should not be confused with formatting to a specified decimal places. For example, ROUND([AngularVelocity],3).

Syntax

ROUND(number, number_digits)

The ROUND function syntax has the following arguments:

  • number Required. The number to round.
  • number_digits Required. The number of digits to which you want to round the number argument.

Notes

  • If number_digits is greater than 0 (zero), then number is rounded to the specified number of decimal places.
  • If number_digits is 0, the number is rounded to the nearest integer.
  • If number_digits is less than 0, the number is rounded to the left of the decimal point.
  • To always round up (away from zero), use the ROUNDUP function.
  • To always round down (toward zero), use the ROUNDDOWN. function.

Examples

The following examples show various results for values in the Number field.

Formula Description Result
ROUND([Number], 3) Rounds 2.2861 to three decimal places. 2.286
ROUND([Number], 2) Rounds 2.2861 to two decimal places. 2.29
ROUND([Number], 1) Rounds 33.5 to one decimal left of the decimal point. 30
ROUND([Number], -3) Rounds 721.4 to the nearest multiple of 1000. 1000
ROUND([Number], -2) Rounds -50.55 to the nearest multiple of 100. -100