Database Reference
In-Depth Information
{ βˆ’- Do NOT include parentheses when
-- you want TWO tuples (a.k.a. result values) from the SAME dimension-heirarchy
[DimTitles].[TitleType].&[Business] -- 3rd tuple
, [DimTitles].[TitleType].&[Psychology] -- 4th tuple
} On Rows
From [CubePubsSales];
Figure 14-9 shows the results of the working query.
Figure 14-9. The results from Listing 14-13
The same is true when working with the Measures dimension. If you use parentheses to encompass two
multiple measures, as demonstrated in Listing 14-14, SSAS assumes you are trying to indicate two coordinates on
the Measures dimension. Doing so gives you the following error: β€œThe 'Measures' hierarchy appears more than
once in the tuple.”
Listing 14-14. Using Parentheses to Encompass Two Multiple Measures
Select
{ ( βˆ’- This will not work!
[Measures].[SalesQuantity]
, [Measures].[NumberOfSales]
) } On Columns
From [CubePubsSales];
//Error = The 'Measures' hierarchy appears more than once in the tuple.
This aspect of MDX does not come into play if you are asking for a single tuple based on the coordinates
from two different dimensions. Listing 14-15 shows an example that returns a single tuple across the rows axis by
identifying coordinates from both the DimTitles and DimStores dimensions. Figure 14-10 shows the results.
Search WWH ::




Custom Search