dbTalk Databases Forums  

MDX equivalent of a SQL Union AND/OR LookupCube

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


Discuss MDX equivalent of a SQL Union AND/OR LookupCube in the microsoft.public.sqlserver.olap forum.



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

Default MDX equivalent of a SQL Union AND/OR LookupCube - 06-10-2005 , 10:57 AM






I am looking for a way to basically do a SQL union of results from multiple
cubes. I know that in MDX the Union() function is used to join the results
of two sets, but I am wondering if there are any ways to bring the results
of multiple cubes together.

I have tried using the LookupCube function, but I cannot get it to return
the correct results. Does the LookupCube function not apply the same
dimension filters that get applied to the other calculated measure?

With
member [Measures].[% LEP Minimal] AS 'LookupCube ("WAALEP",
"(Sum({[WAALEPReadingPL].[Minimal]},[Measures].[ReadingPLCount]) /
[Measures].[StudentCount])")', format = '#%'
member [Measures].[% KCE Minimal] as '(Sum({[WKCEMathPL].[All
WKCEMathPL].[Minimal]},[Measures].[MathPLCount]) /
[Measures].[StudentCount])', format = '#%'

SET [Districts] AS '{[District].[District A], [District].[All
District].[District B]}'

Select
{[Measures].[% LEP Minimal], [Measures].[% KCE Minimal]} on axis(0),
{[Districts]} on axis(1)

from [GRT]

where (
[Grade Level].[Grade Level Name].[Grade 04],
[Year].[2004-05]
)

What am I doing wrong? They are shared dimensions for both cubes.

thank you,
tim



Reply With Quote
  #2  
Old   
Tim Chapla
 
Posts: n/a

Default Re: MDX equivalent of a SQL Union AND/OR LookupCube - 06-10-2005 , 11:08 AM






Hi All,

Sorry for the post, I solved this problem very simply with a Virtual Cube.
Worked like a charm.

tim

"Tim Chapla" <tchapla (AT) nospam (DOT) turnleaf.com> wrote

Quote:
I am looking for a way to basically do a SQL union of results from multiple
cubes. I know that in MDX the Union() function is used to join the results
of two sets, but I am wondering if there are any ways to bring the results
of multiple cubes together.

I have tried using the LookupCube function, but I cannot get it to return
the correct results. Does the LookupCube function not apply the same
dimension filters that get applied to the other calculated measure?

With
member [Measures].[% LEP Minimal] AS 'LookupCube ("WAALEP",
"(Sum({[WAALEPReadingPL].[Minimal]},[Measures].[ReadingPLCount]) /
[Measures].[StudentCount])")', format = '#%'
member [Measures].[% KCE Minimal] as '(Sum({[WKCEMathPL].[All
WKCEMathPL].[Minimal]},[Measures].[MathPLCount]) /
[Measures].[StudentCount])', format = '#%'

SET [Districts] AS '{[District].[District A], [District].[All
District].[District B]}'

Select
{[Measures].[% LEP Minimal], [Measures].[% KCE Minimal]} on axis(0),
{[Districts]} on axis(1)

from [GRT]

where (
[Grade Level].[Grade Level Name].[Grade 04],
[Year].[2004-05]
)

What am I doing wrong? They are shared dimensions for both cubes.

thank you,
tim




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.