Skip to main content
Skip table of contents

ROUND

Category: Math & numeric

Overview

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.

Syntax

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

Example usage: ROUND('Revenue', "HALF_UP", 2)

Parameters

Parameter

Description

Type

Required

Default

Node

Input node, specified using the node name in single quotes (e.g.'Revenue')

Node reference

Yes

--

RoundingMode

Specifies the rounding behavior. Case-insensitive.

Keyword

No

HALF_UP

Scale

Number of decimal digits to round to.0 rounds to whole numbers, 2 rounds to two decimal places, -2 rounds to whole hundreds.

Number

No

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

Aspect

Behavior

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.


Examples

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

Year

Revenue

2025

-24.50

2026

95.99

2027

100.0

2028

133.33

Formula: ROUND('DecimalNode')

Year

→ ROUND Result

2025

-25

2026

96

2027

100

2028

133

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

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

Year

→ ROUND Result

2025

-25

2026

96

2027

100

2028

134

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

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

Year

→ ROUND Result

2025

-20

2026

90

2027

100

2028

130

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


Related Functions

Function

When to use instead

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.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.