dbTalk Databases Forums  

One dimension by the other in columns using MDX

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


Discuss One dimension by the other in columns using MDX in the microsoft.public.sqlserver.olap forum.



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

Default One dimension by the other in columns using MDX - 03-03-2004 , 03:43 AM






Hi,

We have the big problem with putting two elements from different dimensions
one by the other in columns (not nested!).
It was impossible to find any documentation saying that is possible or not
with use of Analysis Services.
What is very interesting this works fine in case of SAP BW, but it seems to
not work with Microsoft AS.
I have tried many things including UNION. I know also about CROSSJOIN
function, but nesting does not solve our problem.
The sample query which should work looks like:

SELECT
{[Time].MEMBERS , [Gender].MEMBERS} ON COLUMNS,
[Yearly Income].MEMBERS ON ROWS
FROM Sales

Any information about "this is working" somehow (including code usage) or it
will not work is appreciated.

Regards,
Adam Koszlajda
Codec Systems



Reply With Quote
  #2  
Old   
Brian Altmann
 
Posts: n/a

Default RE: One dimension by the other in columns using MDX - 03-03-2004 , 06:31 AM






In MDX you specify a set for each axis
As stated in BOL (Members, Tuples and Sets), all tuples in a set must have the same dimensionality
In terms of MDX, the closest you can get to what you want would be a query such as

SELEC
{ crossjoin({gender.[all gender]},[Time].MEMBERS) ,crossjoin( [Gender].MEMBERS ,{time.[1997]}) } ON COLUMNS
[Yearly Income].MEMBERS ON ROW
FROM Sale

You might enable the (All) level in Time and use the [All Time] member instead of 1997
Your other alternative, of course, is to perform two queries and merge the result in your client application

HTH
Bria
www.geocities.com/brianaltmann/olap.htm



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.