ISNULL
Evaluates a scalar MDX expression and returns either its value or an alternative value (if the value of the expression is null). This function is an InterSystems extension to MDX.
Returned Type
This function returns an expression of the same type that you use with the function.
Syntax and Details
ISNULL(MDX_expression,value_if_null)
Where:
-
MDX_expression is a scalar MDX value (a numeric, string, or logical expression).
-
value_if_null is the value to return if MDX_expression evaluates to null.
Example
The following shows a simple example:
SELECT ISNULL(MEASURES.[%COUNT],"None") ON 0, birthd.decade.MEMBERS ON 1 FROM patients where diagd.chd
ISNULL
1 1910s None
2 1920s 1
3 1930s 12
4 1940s 3
5 1950s 10
6 1960s 3
7 1970s None
8 1980s 1
9 1990s None
10 2000s None
11 2010s None