Database Reference
In-Depth Information
{ −- Dim.Member
[DimTitles].[Is Anger the Enemy?]
} On Rows
From [CubePubsSales];
GO
-- Or even like this...
Select
{ [Measures].[SalesQuantity] } On Columns,
{ −- Member
[Is Anger the Enemy?]
} On Rows
From [CubePubsSales];
In Listing 14-27, we provide some examples of what not to do when typing MDX member paths. The
following list describes what is happening in the examples in this listing:
1.
A hierarchy is left out of the path and goes straight to the level and members.
2.
A path to a member is broken by skipping over a level.
3.
A path of members fails to be properly chained together because the level is in front of
the members.
Listing 14-27. MDX Errors to Avoid
-- 1. Skipping the hierarchy
Select
{ [Measures].[SalesQuantity]} On Columns,
{ −- Dim.<Skipped hierarchy>.Level.Level.Member
-- DOES NOT WORK (but does NOT give an error!)
[DimTitles].[Publisher].[Title].[Is Anger the Enemy?]
} On Rows
From [CubePubsSales];
-- 2. Skipping over a level breaks the path to the member
Select
{ [Measures].[SalesQuantity]} On Columns,
{ −- Dim.Level.<Skipped Level>.Member
-- DOES NOT WORK (but does not give an error either!)
[DimTitles].[All].[Is Anger the Enemy?]
} On Rows
From [CubePubsSales];
-- 3. Multiple members after a level
Select
{ [Measures].[SalesQuantity]} On Columns,
{ −- Dim.Level.Member.Member
-- DOES NOT WORK (and of course no error either!)
[DimTitles].[Publisher].[New Moon Books].[Is Anger the Enemy?]
} On Rows
From [CubePubsSales];
Search WWH ::




Custom Search