dbTalk Databases Forums  

MDX : Taking a union of slices

comp.databases.olap comp.databases.olap


Discuss MDX : Taking a union of slices in the comp.databases.olap forum.



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

Default MDX : Taking a union of slices - 09-10-2004 , 07:44 AM






In a MDX query, I would like to slice on 2 dimensions in the following
way:
The sales cube in the sample OLAP database I need to retrieve the Unit
Sales for Gender=Male or Marital Status=Married.
To obtain the results without the above slice, I query the cube as
WITH
SET __CRYSTAL_SET_ON_AXIS_0__ AS ' { [Measures].[Unit Sales]
} '
SET __CRYSTAL_SET_ON_AXIS_1__ AS ' { [Store].[Store
Country].AllMembers } '
SELECT
__CRYSTAL_SET_ON_AXIS_0__ ON COLUMNS ,
__CRYSTAL_SET_ON_AXIS_1__ ON ROWS
FROM [Sales]

If I add
WHERE
( [Gender].[Gender].&[M], [Marital Status].[Marital Status].&[M]
)
the results are an intersection of the set with Gender=M and Marital
Status=M. I am interested in the union.

Can someone suggest a way to query for a union in the where clause?
The actual number of dimensions in the cube I am working on is around
8, and hence would be having to solve the above problem for a union of
members from around 8 dimensions.

Thanks
Yash

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.