Menu
Amazon QuickSight
User Guide

round Function

round rounds a decimal value to the closest integer if no scale is specified, or to the closest decimal place if scale is specified.

Syntax

Copy
round(decimal, scale)

Arguments

decimal

A field that uses the decimal data type, a literal value like 17.62, or a call to another function that outputs a decimal.

scale

The number of decimal places to use for the return values.

Return Type

Decimal

Example

The following example rounds a decimal field to the closest second decimal place.

Copy
round(sales_amount, 2)

For the field values:

Copy
20.1307 892.0388 57.5447

The following values are returned:

Copy
20.13 892.04 58.54