dbTalk Databases Forums  

Joining data from differrent cubes (MDX)

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


Discuss Joining data from differrent cubes (MDX) in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ryno.smit@gmail.com
 
Posts: n/a

Default Joining data from differrent cubes (MDX) - 10-26-2005 , 06:55 AM






Hi,

I'm having trouble with a specific MDX query, I have to join Measures
from two different fact tables (On two different cubes) that don't
share the same dimensions (Although they do have common dimensions)
I've tried using calculated members to collect the data but it seems
that when I slice and construct the axes the calculated members
calculate on the current query structure.

Is there a way to combine two different data sets like in SQL UNION or
have two Select statements in one MDX Query? Sorry, i'm very new to MDX
if this is a dumb question...

Thanks,

Ryno Smit


Reply With Quote
  #2  
Old   
ryno.smit@gmail.com
 
Posts: n/a

Default Re: Joining data from differrent cubes (MDX) - 10-26-2005 , 07:09 AM






Ok,

Perhaps what I'm trying to do is very unclear, so here is a better
description of what exactly I want to do with my data..

I have a fact cell called [Candidate Votes]

Then I have dimensions containing Wards, Parties and Candidates

What i want to do is get the topcount of 2 candidates per ward and then
I need to calculate a total of votes per ward so I can calculate the
percentage that winning candidate got...

The data should resemble something like

Ward Candidate Party Votes per Candidate
Votes Per Ward
0001 J. Doe Sparty 2345
8195


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

Default Re: Joining data from differrent cubes (MDX) - 10-26-2005 , 10:51 PM



Could you clarify whether there is a single cube (presumably with the
measure: [Candidate Votes]), or there are 2 different cubes, as implied
by the thread title?


- Deepak

Deepak Puri
Microsoft MVP - SQL Server

*** Sent via Developersdex http://www.developersdex.com ***

Reply With Quote
  #4  
Old   
ryno.smit@gmail.com
 
Posts: n/a

Default Re: Joining data from differrent cubes (MDX) - 10-27-2005 , 01:31 AM



There is a single virtual cube comprised of four different cubes, each
with more or less the same dimensions.

What's needs to happen is the following...

I have to:
a. Filter on a dimension called Electoral Event (Using where clause)
b. Capture the topcount of 2 highest voted candidates (Per Ward), from
three different dimension members and combine them into a tuple
c. Calculate the sum of votes per ward for all candidates

I have managed to do a & b but because b sits on the Row axis and
obviously [Candidate Votes] on columns, I'm unable to create a
calculated member in MDX to get me the total votes per ward. The cube
cannot be altered.

Concerning joining data from different cubes I have managed, but now I
have this problem above. Having two calculated members that work at
different level within the query & they cannot run in conjunction,
because my Sum calc member sum's the votes for the two topcount
candidates per ward, instead of all candidates...


Reply With Quote
  #5  
Old   
ryno.smit@gmail.com
 
Posts: n/a

Default Re: Joining data from differrent cubes (MDX) - 10-27-2005 , 06:04 AM



Ok, thanks for your responses Deepak Puri, but I have resolved the
issue.

The problem was with the construction of the calculation member for
summing the total votes per candidate...


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.