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

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 error.

CoalesceEmpty([Measures].[Alternative code], '') MATCHES "2.*"