Skip to main content
Workday User Guide
Last Updated: 2023-06-23
COALESCE

COALESCE

Description

COALESCE
is a row function that returns the first valid value (
NOT NULL
value) from a comma-separated list of expressions.

Syntax

COALESCE
(
expression
[,
expression
][,...])

Return Value

Returns one value per row of the same type as the first valid input expression.

Input Parameters

expression
At least one required. A field name or expression.

Examples

The following example shows an expression to calculate employee yearly income for exempt employees that have a
salary
and non-exempt employees that have an
hourly_wage
. This expression checks the values of both fields for each row, and returns the value of the first expression that is valid (
NOT NULL
).
COALESCE([hourly_wage] * 40 * 52, [salary])