/    /  Amazon QuickSight – Coalesce

Amazon QuickSight – Coalesce

 

The COALESCE function in Amazon QuickSight returns the first non-null value from a list of expressions. 

Syntax

#Start#
coalesce(expression1, expression2 [, expression3, ...])
#End#

 

This function takes one or more arguments

expression1: the first expression to be evaluated for a non-null value.

expression2: the second expression to be evaluated for a non-null value, and so on.

 

Example

#Start#
COALESCE(NULL, "A", "B", "C")
#End#

 

This will return the first non-null value, which is “A”.

 

The COALESCE function can be useful in data analysis and reporting when dealing with missing or null values. For example, you could use this function to return a default value for a null or missing value in a column.