Menu
Amazon QuickSight
User Guide

decimalToInt Function

decimalToInt converts a decimal value to the integer data type by stripping off the decimal point and any numbers after it. decimalToInt does not round up (for example, decimalToInt(29.99) returns 29).

Syntax

Copy
decimalToInt(decimal)

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.

Return Type

Integer

Example

The following example converts a decimal field to an integer.

Copy
decimalToInt(sales_amount)

For the field values:

Copy
20.13 892.03 57.54

The following values are returned:

Copy
20 892 58