dbTalk Databases Forums  

NonEmptyCrossJoin with "Crossjoin Set Count" option

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


Discuss NonEmptyCrossJoin with "Crossjoin Set Count" option in the microsoft.public.sqlserver.olap forum.



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

Default NonEmptyCrossJoin with "Crossjoin Set Count" option - 09-14-2004 , 04:01 PM






Why my NonEmptyCrossJoin using two tuples used to determine which
members are considered nonempty doesn't work?

I have the following situation, a cell calculated that works in the
Schedule Y and in the nonleaf members of Prod dimension. In fact, it's
just a simple example. The formula is:

Sum(NonEmptyCrossjoin(Descendants ([Prod].CurrentMember,,LEAVES),
{[Schedule].[X]}, {[Schedule].[Y]}, 1),1)

I have the values below in my fact table, I get null in
(Prod.Total,Schedule.Y)

Prod.Total Prod.A Prod.B
Schedule.X 30 10 20
Schedule.Y NULL 100 50

However, if I put just one tuple to be tested as nonempty, like

Sum(NonEmptyCrossjoin(Descendants ([Prod].CurrentMember,,LEAVES),
{[Schedule].[X]}, 1),1)
or

Sum(NonEmptyCrossjoin(Descendants ([Prod].CurrentMember,,LEAVES),
{[Schedule].[Y]}, 1),1)

I properly get (Prod.Total,Schedule.Y) = 2. According to BOL I can
define more than one tuple to determine the nonempty. So, why does it
happen?

Thanks in advance,

Vinicius Bellino

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

Default Re: NonEmptyCrossJoin with "Crossjoin Set Count" option - 09-14-2004 , 08:35 PM






Unless there was a typo, shouldn't the expression be:

Quote:
Sum(NonEmptyCrossjoin(Descendants ([Prod].CurrentMember,,LEAVES),
{[Schedule].[X], [Schedule].[Y]}, 1),1)
Quote:

- Deepak

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


Reply With Quote
  #3  
Old   
Vinicius Bellino
 
Posts: n/a

Default Re: NonEmptyCrossJoin with "Crossjoin Set Count" option - 09-15-2004 , 07:26 AM



Deepak,

I confused the last set with a tuple, so I thought that I couldnīt use
two members of the same dimension in that tuple. In fact, I found odd
when I saw your solution at the first time. But you are right, being a
set it will probably work.

Thanks,

Vinicius Bellino

Deepak Puri <deepak_puri (AT) progressive (DOT) com> wrote

Quote:
Unless there was a typo, shouldn't the expression be:


Sum(NonEmptyCrossjoin(Descendants ([Prod].CurrentMember,,LEAVES),
{[Schedule].[X], [Schedule].[Y]}, 1),1)



- 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.