ROUND

ROUND('Node' [, "RoundingMode" [, Scale]])

In Math & numeric

The ROUND function rounds each value of the input node to the specified number of decimal digits. The rounding behavior and precision can be controlled with optional parameters.

Use this function when you need stable rounding for reporting, presentation, or downstream calculation steps: ROUND('Revenue', "HALF_UP", 2).

Parameters

NodeNode referenceRequired
Input node, specified using the node name in single quotes (e.g.'Revenue')
RoundingModeKeywordOptional
Specifies the rounding behavior. Case-insensitive. Default: HALF_UP.
ScaleNumberOptional
Number of decimal digits to round to.0 rounds to whole numbers, 2 rounds to two decimal places, -2 rounds to whole hundreds. Default: 0.

Rounding modes:

  • "HALF_UP": Rounds towards the nearest neighbor. If equidistant (e.g. 2.5), rounds up. This is the default and the most common rounding mode.
  • "HALF_DOWN": Rounds towards the nearest neighbor. If equidistant, rounds down.
  • "HALF_EVEN": Rounds towards the nearest neighbor. If equidistant, rounds towards the even neighbor (“banker’s rounding”).
  • "UP": Rounds away from zero. Always increases the absolute value.
  • "DOWN": Rounds towards zero. Always decreases the absolute value (truncation).
  • "CEILING": Rounds towards positive infinity. Positive values round up, negative values round towards zero.
  • "FLOOR": Rounds towards negative infinity. Positive values round down, negative values round away from zero.

See also: Java RoundingMode documentation

Output shape

Dimensionality
Same as input.
Values
Each value is rounded according to the specified mode and scale.
Row count
Same as input.

Watch out

  • Scale requires RoundingMode. You cannot specify a scale without also specifying a rounding mode. ROUND('Node', 2) is not valid. Use ROUND('Node', "HALF_UP", 2) instead.
  • Negative scale rounds to powers of 10: scale -1 rounds to tens, -2 to hundreds, -3 to thousands.
  • Rounding is applied element-wise to each value independently.

Example

Rounding with different modes and scales

This example shows how ROUND behaves with the default mode, with explicit upward rounding, and with downward rounding to tens. The same decimal input is used for all three formulas.

Input node: 'DecimalNode'

YearRevenue
2025-24.50
202695.99
2027100.0
2028133.33

Formula: ROUND('DecimalNode')

YearROUND Result
2025-25
202696
2027100
2028133

Default: HALF_UP with scale 0 (round to whole numbers).

Formula: ROUND('DecimalNode', "UP")

YearROUND Result
2025-25
202696
2027100
2028134

UP rounds away from zero. 133.33 rounds up to 134.

Formula: ROUND('DecimalNode', "DOWN", -1)

YearROUND Result
2025-20
202690
2027100
2028130

DOWN with scale -1 truncates towards zero and rounds to the nearest ten.

See also

MAX
When you need a simple cap or lower threshold instead of rounding a value.
MIN
When you need a simple floor or upper threshold instead of rounding logic.
Was this page helpful?