[Mondrian] Union of dimensions.....

Julian Hyde jhyde at pentaho.com
Wed Dec 8 16:28:55 EST 2010


Sounds like you want something like this:
 
select {[Measures].[Measure1], [Measures].[Measure2]} on columns,
 {[Time].[Months].Members,
  [Customer].[Customer Name].Members} on rows
from [My Cube]
 
But that's illegal MDX because you can't mix members of different dimensions
(or even different hierarchies in the same dimension) in a particular set.
 
If I recall, early versions of Microsoft Analysis Services were looser typed
than Mondrian, and may even have allowed this. But what you're asking goes
against the grain for most OLAP engines.
 
Julian


  _____  

From: mondrian-bounces at pentaho.org [mailto:mondrian-bounces at pentaho.org] On
Behalf Of tom at wamonline.org.uk
Sent: Tuesday, December 07, 2010 10:30 PM
To: tom at wamonline.org.uk; Mondrian developer mailing list
Subject: Re: [Mondrian] Union of dimensions.....


Lack of sleep, my description sucks.

An SQL example would look something like:

select * FROM(
select TIME_ID, MONTH_NAME, ORDERNUMBER from ORDERS,DIM_TIME
UNION
select CUSTOMERS.CUSTOMERNUMBER, CUSTOMERNAME, ORDERNUMBER from
ORDERS,CUSTOMERS);

If that helps make it any clearer :)

Stupid business case.

Cheers

Tom

On Wed 8/12/10 5:41 AM , tom at wamonline.org.uk sent:


Hi Guys,

I have a requirement for a query where basically I take a large set of
unrelated dimensions, and a certain metric calculated about them, and then
sort by this metric value.

Something like:

MemberID, MemberName, MetricValue

In SQL this would be achieved by a big fat union and then a wrapping query
where you sorted the values. But is this even possible in MDX?

I was thinking about some very large super dimension which contained every
value at its lowest granularity created by some arbitrary SQL and using
that, but is there actually a "real" way to do this?

Thanks

Tom




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20101208/e4d73641/attachment.html 


More information about the Mondrian mailing list