dbTalk Databases Forums  

Possible to return 0 instead of blank?

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Possible to return 0 instead of blank? in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Kaisa M. Lindahl
 
Posts: n/a

Default Possible to return 0 instead of blank? - 01-14-2005 , 02:28 AM






Is it possible to have an mdx query return 0 instead of blank? I have a lot
of measures that are numeric, so is it possible to add some statement to the
query og something to get a 0?

Kaisa M. Lindahl



Reply With Quote
  #2  
Old   
tawargerip@hotmail.com
 
Posts: n/a

Default Re: Possible to return 0 instead of blank? - 01-14-2005 , 02:37 AM






use IIF( isempty(<Measure name>),0,<Measure name>)
you may need to create a calculated member for each measure like this


Kaisa M. Lindahl wrote:
Quote:
Is it possible to have an mdx query return 0 instead of blank? I have
a lot
of measures that are numeric, so is it possible to add some statement
to the
query og something to get a 0?

Kaisa M. Lindahl


Reply With Quote
  #3  
Old   
Cymryr
 
Posts: n/a

Default Re: Possible to return 0 instead of blank? - 01-14-2005 , 04:18 AM



Function CoalesceEmpty is the right way to do it, see BOL


"Kaisa M. Lindahl" <kaisaml (AT) hotmail (DOT) com> wrote

Quote:
Is it possible to have an mdx query return 0 instead of blank? I have a
lot
of measures that are numeric, so is it possible to add some statement to
the
query og something to get a 0?

Kaisa M. Lindahl





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.