dbTalk Databases Forums  

Need Help to form the MDX-Statement

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


Discuss Need Help to form the MDX-Statement in the microsoft.public.sqlserver.olap forum.



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

Default Need Help to form the MDX-Statement - 11-27-2006 , 07:01 AM






Hello, I have following Situation:
I have a Dimension "SourceDirectory", whis has Elements
"SourceDirectory1", "SourceDirectory2", ... until "SourceDirectory10".

My Statement in MDX is whis:
SELECT {[Measures].AllMembers} ON columns,
{[SourceDirectory].Children} ON rows
FROM [CheckstyleError]
It works. Now, how can I select all SourceDirectories but not the
"SourceDirectory6", whis has only NULL-Values and I need't to see it in
my report.
I would be glad to have an early reply!
Thanks


Reply With Quote
  #2  
Old   
Bernhard Saemmer
 
Posts: n/a

Default RE: Need Help to form the MDX-Statement - 11-27-2006 , 09:55 AM






Hi Chris,

this should work:

SELECT EXCEPT( {[Measures].AllMembers}, {[Measures].[SourceDirectory6]}) ON
columns, ...




--
CS Result GmbH
Bischof-von-Henle-Str. 2
93051 Regensburg


"chris" wrote:

Quote:
Hello, I have following Situation:
I have a Dimension "SourceDirectory", whis has Elements
"SourceDirectory1", "SourceDirectory2", ... until "SourceDirectory10".

My Statement in MDX is whis:
SELECT {[Measures].AllMembers} ON columns,
{[SourceDirectory].Children} ON rows
FROM [CheckstyleError]
It works. Now, how can I select all SourceDirectories but not the
"SourceDirectory6", whis has only NULL-Values and I need't to see it in
my report.
I would be glad to have an early reply!
Thanks



Reply With Quote
  #3  
Old   
Helmut Knappe
 
Posts: n/a

Default Re: Need Help to form the MDX-Statement - 11-28-2006 , 02:08 AM



Hi Bernhard,

or if you intend to remove all empty values you might use the NON EMPTY
keyword or NonEmpty() function:

SELECT
{[Measures].AllMembers} ON columns,
NON EMPTY {[SourceDirectory].Children} ON rows
FROM [CheckstyleError]

Helmut Knappe
Business Intelligence Ware GmbH
Muenchen


"Bernhard Saemmer" <BernhardSaemmer (AT) discussions (DOT) microsoft.com> schrieb im
Newsbeitrag news:888A6794-E168-473B-A69F-FDE8FB26D790 (AT) microsoft (DOT) com...
Quote:
Hi Chris,

this should work:

SELECT EXCEPT( {[Measures].AllMembers}, {[Measures].[SourceDirectory6]})
ON
columns, ...

--
CS Result GmbH
Bischof-von-Henle-Str. 2
93051 Regensburg


"chris" wrote:

Hello, I have following Situation:
I have a Dimension "SourceDirectory", whis has Elements
"SourceDirectory1", "SourceDirectory2", ... until "SourceDirectory10".

My Statement in MDX is whis:
SELECT {[Measures].AllMembers} ON columns,
{[SourceDirectory].Children} ON rows
FROM [CheckstyleError]
It works. Now, how can I select all SourceDirectories but not the
"SourceDirectory6", whis has only NULL-Values and I need't to see it in
my report.
I would be glad to have an early reply!
Thanks





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.