dbTalk Databases Forums  

Empty Cells - MDX

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


Discuss Empty Cells - MDX in the microsoft.public.sqlserver.olap forum.



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

Default Empty Cells - MDX - 11-23-2004 , 10:33 PM






Hello,

I want to display the Accounts and their Key value with the Measure SALES.
Like

"With Member [Measures].[Account Key] As
'[Account].CurrentMember.Properties("Key")'
Select Non Emopty({[Account].[Account Name].Members}) On Rows,
{[Measures].[Account Key], [Measures].[Sales]} On Columns
From Sales"

When I include the Measure [Account Key] on columns, the query displays the
empty cells also and if I don't include the measure [Account Key], I get the
cells having "Sales" value.

Please help me in eliminating the empty cells. Thanks in advance.

Manoj



Reply With Quote
  #2  
Old   
Deepak Puri
 
Posts: n/a

Default Re: Empty Cells - MDX - 11-23-2004 , 11:30 PM






You can force the text measure to be empty whenever the associated
[Sales] measure is empty:

Quote:
With Member [Measures].[AccountKeyText] As
'[Account].CurrentMember.Properties("Key")'
Member [Measures].[Account Key] As
'iif(IsEmpty([Measures].[Sales]), NULL,
[Measures].[AccountKeyText])'

Select Non Emopty({[Account].[Account Name].Members}) On Rows,
{[Measures].[Account Key], [Measures].[Sales]} On Columns
From Sales
Quote:

For an explanation of why a second measure is needed:

http://groups.google.com/groups?hl=e...HA.2216%40TK2M
SFTNGP10.phx.gbl


- Deepak

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


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.