Reputation: 1
I need to display 0 instead of empty cell when browsing a cube in excel. I used mdx functions like: IIF(ISEMPTY(Measure) = True , 0, Measure)
but, i don't like this solution. I need to find, if there is another solution more simple than this one. If someone knows please share the information.
Upvotes: 0
Views: 3914
Reputation: 807
You can use the COALESCEEMPTY(Measure, 0) function of MDX. It works in the same manner as COALESCE in SQL and returns the first non empty value.
Upvotes: 0
Reputation: 13315
Depending on your client tool, you could get along with using the format string for the measure. If you would e. g. use "0;;;0"
or "#,##0;;;0"
as the format string, then empty (i. e. null
) values would use the part after the third semicolon, which is 0
, for display.
A detailed documentation of the format_string
can be found at http://technet.microsoft.com/en-us/library/ms146084.aspx. And the possibility to use the format string is just offered by Analysis Services to the client tool accessing the cube, and the tool itself - actually, its developers - decides if it uses that or the raw numeric value instead.
Upvotes: 1