dbTalk Databases Forums  

"non empty" and "nonempty()"

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


Discuss "non empty" and "nonempty()" in the microsoft.public.sqlserver.olap forum.



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

Default "non empty" and "nonempty()" - 05-18-2006 , 08:25 AM






I have a simple MDX query as follows:

select
{[Sales]} on columns,
non empty [Stores].[Stores].[Alberta].children on rows
from [Cube]
where ([Time].[Calendar].[Day].&[2006-02-02T00:00:00])

and it returns the stores with sales on that day.

Now when I replace the "non empty" by "nonempty()" as follows:


select
{[Sales]} on columns,
nonempty ([Stores].[Stores].[Alberta].children) on rows
from [Cube]
where ([Time].[Calendar].[Day].&[2006-02-02T00:00:00])

I get 0 rows returned.

why is that ?

Reply With Quote
  #2  
Old   
Pat
 
Posts: n/a

Default RE: "non empty" and "nonempty()" - 05-18-2006 , 08:27 AM






Forgot to mention: SSAS 2005 SP1.

"Pat" wrote:

Quote:
I have a simple MDX query as follows:

select
{[Sales]} on columns,
non empty [Stores].[Stores].[Alberta].children on rows
from [Cube]
where ([Time].[Calendar].[Day].&[2006-02-02T00:00:00])

and it returns the stores with sales on that day.

Now when I replace the "non empty" by "nonempty()" as follows:


select
{[Sales]} on columns,
nonempty ([Stores].[Stores].[Alberta].children) on rows
from [Cube]
where ([Time].[Calendar].[Day].&[2006-02-02T00:00:00])

I get 0 rows returned.

why is that ?

Reply With Quote
  #3  
Old   
Akshai Mirchandani [MS]
 
Posts: n/a

Default Re: "non empty" and "nonempty()" - 05-18-2006 , 02:49 PM



The two are not equivalent. The nonempty function is executed independent of
the tuples on the other axes (in this case [Sales] and
[Time].[Calendar].[Day].&[2006-02-02T00:00:00]) but the NON EMPTY clause
takes them into consideration.

Thanks,
Akshai
--
Try out the MSDN Forums for Analysis Services at:
http://forums.microsoft.com/MSDN/Sho...ID=83&SiteID=1

This posting is provided "AS IS" with no warranties, and confers no rights
Please do not send email directly to this alias. This alias is for newsgroup
purposes only.

"Pat" <pat (AT) online (DOT) nospam> wrote

Quote:
Forgot to mention: SSAS 2005 SP1.

"Pat" wrote:

I have a simple MDX query as follows:

select
{[Sales]} on columns,
non empty [Stores].[Stores].[Alberta].children on rows
from [Cube]
where ([Time].[Calendar].[Day].&[2006-02-02T00:00:00])

and it returns the stores with sales on that day.

Now when I replace the "non empty" by "nonempty()" as follows:


select
{[Sales]} on columns,
nonempty ([Stores].[Stores].[Alberta].children) on rows
from [Cube]
where ([Time].[Calendar].[Day].&[2006-02-02T00:00:00])

I get 0 rows returned.

why is that ?



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.