dbTalk Databases Forums  

Cell Format & Display "0" Issue - MSAS - 2000

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


Discuss Cell Format & Display "0" Issue - MSAS - 2000 in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Prasad
 
Posts: n/a

Default Cell Format & Display "0" Issue - MSAS - 2000 - 06-16-2005 , 03:22 PM






Hi,

I have 2 questions on cell formatting.

1. Source Measure - value coming directly from the data base.

For empty cells, MSAS does not display anything. It leaves it empty. I want
to display either 0 for counts or 0.00 for amounts. Please advice.


2. Calculated Members or Measures.

I want to display a number with 2 zeros after the decimal point (ex:
12345.00). I am able to do this with the following formulae; But for empty
cells, it displays just "0" instead of "0.00". Please correct my formatting
expression.


format(iif([Measures].[Member Months] <> 0, [Measures].[Billed
Amount]/[Measures].[Member Months], 0),"##.00;(##.00);0.00")


Thanks,

Sam.


Reply With Quote
  #2  
Old   
OLAPMonkey (http://olapmonkey.blogspot.com/)
 
Posts: n/a

Default Re: Cell Format & Display "0" Issue - MSAS - 2000 - 06-17-2005 , 11:08 AM






Something like this should do the job...

with Member [Measures].[Unit Sales With Empty Logic] as
'
CoalesceEmpty([Measures].[Unit Sales], 0)

',FORMAT_STRING ='0.00'
select
{
[Measures].[Unit Sales], [Measures].[Unit Sales With Empty Logic]
} on columns,
{
[Customers].[Country].Members
} on rows
from Sales


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

Default Re: Cell Format & Display "0" Issue - MSAS - 2000 - 06-17-2005 , 12:54 PM



Hi,

Thanks for the reply. The issues i had was with calculated members. So, i
can not use "with" asin MDX Statments.

Please advice,

Sam.

"OLAPMonkey (http://olapmonkey.blogspot.c" wrote:

Quote:
Something like this should do the job...

with Member [Measures].[Unit Sales With Empty Logic] as
'
CoalesceEmpty([Measures].[Unit Sales], 0)

',FORMAT_STRING ='0.00'
select
{
[Measures].[Unit Sales], [Measures].[Unit Sales With Empty Logic]
} on columns,
{
[Customers].[Country].Members
} on rows
from Sales



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.