Menu
Amazon QuickSight
User Guide

parseDecimal Function

parseDecimal parses a string to determine if it contains a decimal value. This function returns all rows that contain a decimal, integer, or null value, and skips any rows that do not. If the row contains an integer value, it is returned as a decimal. For example, a value of '2' is returned as '2.0'.

Syntax

Copy
parseDecimal(expression)

Arguments

expression

The expression must be a string. It can be the name of a field that uses the string data type, a literal value like '9.62', or a call to another function that outputs a string.

Return Type

Decimal

Example

The following example evaluates Field2 to determine if it contains decimal values.

Copy
parseDecimal(Field2)

The following are the given field values.

Copy
Field2 -------- 2 2a 12.13 3b 3.9 (null) 198.353398

For these field values, the following rows are returned.

Copy
2.0 12.13 3.9 (null) 198.353398