whytheq
whytheq

Reputation: 35557

Interpretation of [aDimension].[aHierarchy]

If I just write the following within an MDX script [aDimension].[aHierarchy] can it mean one of three different things depending on the context?

  1. Specifies a hierarchy aHierarchy
  2. Specifies the current member of aHierarchy i.e. is actually evaluated as [aDimension].[aHierarchy].currentmember
  3. Specifies the default member of aHierarchy i.e. is actually evaluated as [aDimension].[aHierarchy].defaultmember

EDIT
An example of case 2 is the following where I believe [Geography].[Geography].parent.NAME is implicitly converted to [Geography].[Geography].currentmember.parent.NAME

WITH MEMBER [Measures].[Parent] AS 
       [Geography].[Geography].parent.NAME
SELECT 
    NON EMPTY 
        {[Geography].[Geography].[Country]}
    ON ROWS,
    {[Measures].[Parent]} 
    ON COLUMNS
FROM [Adventure Works]

Upvotes: 1

Views: 25

Answers (1)

Marc Polizzi
Marc Polizzi

Reputation: 9375

I would say [2] is never done that way; you'll have to explicitly specify the currentMember function. [3] is an implicit conversion from hierarchy to member when a member is expected and you give a hierarchy instead.

Upvotes: 2

Related Questions