I don't understand what this gap means - do you really have a member that is called [ ]
?! ... [Product Type].[All Product Type].[ ]
We also need to see the whole script - the context for this snippet - to accurately help you.
If you wanted to test the currentmember
of the hierarchy [Product Type].[All Product Type]
for null then you could do the following:
IIF(
[Product Type].[All Product Type].currentmember.membervalue = 0,
"MISSING",
[Product Type].[All Product Type].currentmember.membervalue
)
In the cubes I play with the above would never happen as all members exist so all members have a membervalue
. Here is an example of replacing blanks:
WITH
MEMBER [Measures].[Internet Sales Amount 2] AS
IIF
(
[Measures].[Internet Sales Amount] = 0
,'MISSING'
,[Measures].[Internet Sales Amount]
)
SELECT
{
[Measures].[Internet Sales Amount]
,[Measures].[Internet Sales Amount 2]
} ON 0
,
[Customer].[Customer Geography].[Country].MEMBERS
*
[Product].[Category].MEMBERS ON 1
FROM [Adventure Works];
The new measure I've created results in the 4 column below:
