dbTalk Databases Forums  

CrossJoin help

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


Discuss CrossJoin help in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Abdul Nasir Khan
 
Posts: n/a

Default CrossJoin help - 08-25-2003 , 01:20 PM






I have a time dimension with levels (Year, Quarter and month). Is
there a way to get a join of Year and Quarter and month?

I am trying it but it gives an error


Thanks

Abdul Nasir Khan

----------------------------------------

Select

{ [Measures].[TotalDocuments] } on columns,
{ CrossJoin(
[dateofissue].[Year].members,
[dateofissue].[Quarter].members
)
} on rows

From
[MyCube]

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

Default Re: CrossJoin help - 08-25-2003 , 07:53 PM






You can't cross-join members from the same dimension.
This earlier thread discusses other options, depending on what results
you want and the OLAP client you are using:

http://groups.google.com/groups?hl=e...8&th=e95161125
d4366f9&rnum=6
Quote:
...
From: George Spofford (george (AT) dsslab (DOT) com)
Subject: Re: Simple CrossJOIN MDX Question

View this article only
Newsgroups: microsoft.public.sqlserver.olap
Date: 2002-01-22 08:40:06 PST

The simple way:

SELECT Measures.MEMBERS ON COLUMNS,
Hierarchize ( {
[Product].[Product Category].MEMBERS,
[Product].[Product Subcategory].MEMBERS
})
ON ROWS
FROM [Sales]
...
Quote:
- Deepak

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


Reply With Quote
  #3  
Old   
Abdul Nasir Khan
 
Posts: n/a

Default Re: CrossJoin help - 08-26-2003 , 05:24 AM



I am new to MDX and OLAP.

About Client :
At the moment I am using the client "MDX Sample Application" to test
my MDX query. Later I plan to develop my own client viewer for viewing
MDX.

Below are equilant MDX in FoodMart 2000

------------------
//MDX Query 1:
select
{[Measures].[Amount]} on columns,
Hierarchize( {[Time].members }) on rows
from budget
------------------
//MDX Query 2:
select
{[Measures].[Amount]} on columns,
{[Time].members } on rows
from budget
------------------

By applying Query1, I am not getting Year, Quarter and Month in
Hierarchical form. Instead I get the result in straight listing
format.
My MDX Query2 is without Hierarchize function.

In other words My MDX Query1 and MDX Query2 has both the same result.

Thanks

Abdul Nasir Khan

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

Quote:
You can't cross-join members from the same dimension.
This earlier thread discusses other options, depending on what results
you want and the OLAP client you are using:

http://groups.google.com/groups?hl=e...8&th=e95161125
d4366f9&rnum=6

..
From: George Spofford (george (AT) dsslab (DOT) com)
Subject: Re: Simple CrossJOIN MDX Question

View this article only
Newsgroups: microsoft.public.sqlserver.olap
Date: 2002-01-22 08:40:06 PST

The simple way:

SELECT Measures.MEMBERS ON COLUMNS,
Hierarchize ( {
[Product].[Product Category].MEMBERS,
[Product].[Product Subcategory].MEMBERS
})
ON ROWS
FROM [Sales]
..


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