I am trying to replace blank spaces in data with the "MISSING" or "NA" text.
CoalesceEmpty([Product Type].[All Product Type].[ ],"MISSING")
I have tried the above code, with or without quotes around MISSING.
Getting the following error: CoalesceEmpty([Product Type].[All Product Type].[ ],"MISSING") is invalid and cannot be used in a query.
P.S. Product Type is a dimension.
I tried this function on measures
and it worked fine there.
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: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:The new measure I've created results in the 4 column below: