/    /  Amazon QuickSight – decimalToInt

Amazon QuickSight – decimalToInt

 

The decimalToInt function in QuickSight is used to convert a decimal value to an integer. The function takes one argument, which is the decimal value that you want to convert.

 

Syntax

#Start#
decimalToInt(decimal)
#End#

 

This function takes three arguments

 

  • Decimal: parameter is the decimal value you want to convert to an integer. The decimal parameter can be any valid decimal value, including decimal numbers with a fractional part.

 

 

When you apply the decimalToInt function to a decimal value, QuickSight rounds the value to the nearest integer and returns the result as an integer value. If the decimal value is exactly halfway between two integer values, the function rounds to the nearest even integer (a process known as “banker’s rounding”).

 

For example, if you have a data set that includes a column for order totals, and you want to create a new column that shows the order total as an integer value, you can use the decimalToInt function to perform the conversion.

 

Example

#Start#
decimalToInt(OrderTotal)
#End#

 

This expression would convert the OrderTotal decimal value to an integer value and return the result in the new column.