CoalesceEmpty

Converges an empty cell value to a number or string and returns the specified value instead of empty.

Syntax

 CoalesceEmpty(String_Expression1 [, String_Expression2])
 CoalesceEmpty(Numeric_Expression1 [, Numeric_Expression2])

Arguments

String_Expression1A valid string expression. Usually an MDX expression of cell coordinates that returns a string.
String_Expression2A valid string expression that will be substituted for a NULL returned by the first string expression.
Numeric_Expression1A valid numeric expression. Usually an MDX expression of cell coordinates that returns a number.
Numeric_Expression2A valid numeric expression that will be substituted for a NULL returned by the first numeric expression.

Examples

CoalesceEmpty([Measures].[Hours spent], 0) will return '0' where the Hours Spent measure is empty.


When some string members need to be compared, CoalesceEmpty can be used to avoid comparing with null cells that can result in null pointer exception

CoalesceEmpty([Measures].[Issue Account], '') MATCHES ".*Analysis.*"

See also