Amazon QuickSight
User Guide


coalesce returns the value of the first argument that is not null. When a non-null value is found, the remaining arguments in the list are not evaluated. If all arguments are null, the result is null. 0-length strings are valid values and are not considered equivalent to null.


coalesce(expression, expression [, expression, ...])


coalesce takes two or more expressions as arguments. All of the expressions must have the same data type or be able to be implicitly cast to the same data type.


The expression must be a string. It can be a field name like address1, a literal value like 'Unknown', or another function like toString({Sales Amount}).

Return Type

coalesce returns a value of the same data type as the input arguments.


The following example retrieves a customer's mailing address if it exists, her street address if there is no mailing address, or returns "No address listed" if neither address is available.

coalesce(mailingAddress, streetAddress, 'No address listed')