Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

CoalesceEmpty

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

Syntax

...

Code Block
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.

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