CoalesceEmpty

Analysis Services

Analysis Services

CoalesceEmpty

Coalesces an empty cell value to a number or string and returns the coalesced value.

Syntax
Numeric

CoalesceEmpty(«Numeric Expression»[, «Numeric Expression»]...)

String

CoalesceEmpty(«String Expression»[, «String Expression»]...)

Remarks

This function returns the first (from the left) nonempty value expression in the list of value expressions. Returns the empty cell value if all value expressions evaluate to the empty cell value.

All value expressions must evaluate to a numeric data type or to the empty cell value. Alternatively, all value expressions must evaluate to a string data type or to the empty cell value.

For more information about empty cells, see the OLE DB documentation.

Examples
Number

The following example returns -99 if Measures.CurrentMember is the empty cell value, otherwise it returns Measures.CurrentMember :

CoalesceEmpty(Measures.CurrentMember, -99)
String

The following example returns the string "EMPTY" if Time.Parent.Name is the empty cell value, Time.Parent.Name otherwise:

CoalesceEmpty(Time.Parent.Name, "EMPTY")