![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I would like to slice on 2 dimensions in the following way: In the sales cube in the sample OLAP database I need to retrieve the Unit Sales for Gender=Male OR Marital Status=Married. This mean I am looking for the measure on the UNION. Somebody suggested, I do this: with member measures.mm as 'sum( union( { {gender.m} * [marital status].[marital status].members } , { gender.gender.members * {[marital status].m}}) ,[unit sales])' select { mm} on columns, [store].[store name].members on rows from Sales This worked very well. But the problem is , I want to get other measures, such as Cost, Sales, Max Sales, Profit, etc, for the same union of slices. I also want to get all measures for Gender=Female OR Status=Married. Ideally, without adding an extra dimension table, and an extra join clause to the cube, I would like to create a dimension based on the existing dimensions. I am not very conversant with virtual dimensions. Can someone guide me on exactly how to achieve the right effect? Ideally I would like to have members MaleMarried, FemaleMarried, MaleSingle and FemaleSingle. How should I write the MDX if I create these as calculated members in the new virtual dimension? Thanks, Yash |
![]() |
| Thread Tools | |
| Display Modes | |
| |