ROUND

ROUND

Description

Rounds each value of the input node to the specified number of decimal digits.

Signature

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

Parameters

  • Node: Input node, specified using the node name in single quotes (e.g. 'Profit')
  • RoundingMode: Specifies the rounding behavior to be used. Supported rounding modes are: CEILING, DOWN, FLOOR, HALF_DOWN, HALF_EVEN, HALF_UP, UP (see https://docs.oracle.com/javase/7/docs/api/java/math/RoundingMode.html for a detailed description). Default: HALF_UP.
  • Scale: Specifies the scale to which the decimal should be rounded. Scale 0 rounds to whole numbers (integers). Scale 2 rounds to 2 decimal digits, whereas scale -2 rounds to whole hundreds.

Example

DecimalNode

Year

Revenue

2013

-24.50

2014

95.99

2015

100.0

2016

133.33333333333

Output ROUND('DecimalNode')

Year

Revenue

2013

-25

2014

96

2015

100

2016

133

Output ROUND('DecimalNode', "UP")

Year

Revenue

2013

-25

2014

96

2015

100

2016

134

Output ROUND('DecimalNode', "DOWN", -1)

Year

Revenue

2013

-20

2014

90

2015

100

2016

130

Was this helpful?

Yes | Somewhat | No