dbTalk Databases Forums  

NON EMPTY

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


Discuss NON EMPTY in the microsoft.public.sqlserver.olap forum.



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

Default NON EMPTY - 08-10-2004 , 06:13 AM






Hello

I have an MDX statement that looks like this:

SELECT
{ Measures.members } on Columns ,
{ CrossJoin( [Time].[Calendar].[2004].[May]:[Time].
[Calendar].[2004].[July],
[Business].[User].[Business Entity Id].[212].Children ) }
on Rows
FROM UsageStats


And it returns this via a matrix report:

2004
Quote:
------|------|------|------|
May | June | July |Total |
------------|------|------|------|------|
Alan Smith | 2 | 3 | 2 | 7 |
Amy Marcus | | 3 | 3 | 6 |
Bob Fields | | | | |
Carry Grant | 1 | | | 1 |
------------|------|------|------|------|
TOTAL | 3 | 6 | 5 | 14 |
------------|------|------|------|------|

The report above represents hits to a website on a per-
Monthly basis for each user.


I would like to supress the empty rows so that Bob Fields,
above, won't show up at all. I tried using
NonEmptyCrossJoin like this:

SELECT
{ Measures.members } on Columns ,
{ NonEmptyCrossJoin( [Time].[Calendar].[2004].[May]:
[Time].[Calendar].[2004].[July],
[Business].[User].[Business Entity Id].
[212].Children ) } on Rows
FROM UsageStats

and just NON EMPTY like this:

SELECT
{ Measures.members } on Columns ,
{ NonEmptyCrossJoin( [Time].[Calendar].[2004].[May]:
[Time].[Calendar].[2004].[July],
[Business].[User].[Business Entity Id].
[212].Children ) } on Rows
FROM UsageStats


Both methods above supress the empty rows, but they also
supress anyone who hasn't had any hits to the site in the
first month, even if they do have hits in the 2nd or 3rd
months (so both Bob Fields, and Amy Marcus are both left
out of the report above).

Does anyone know how to possibly get around this? Any help
at all will be greatly appreciated!!! []

Best regards
Maria



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.