Export (0) Print
Expand All
Avg
IIf
Lag
Max
Min
Mtd
Qtd
Sum
Var
Wtd
Ytd
Expand Minimize

LinkMember (MDX)

Updated: 17 July 2006

Returns the member equivalent to a specified member in a specified hierarchy.


LinkMember(Member_Expression, Hierarchy_Expression) 

Member_Expression

A valid Multidimensional Expressions (MDX) expression that returns a member.

Hierarchy_Expression

A valid Multidimensional Expressions (MDX) expression that returns a hierarchy.

The LinkMember function returns the member from the specified hierarchy that matches the key values at each level of the specified member in a related hierarchy. Attributes at each level must have the same key cardinality and data type. In unnatural hierarchies, if there is more than one match for an attribute's key value, the result will be an error or indeterminate.

Examples

The following example use the LinkMember function to return the default measure in the Adventure Works cube for the ascendants of the July 1, 2002 member of the Date.Date attribute hierarchy in the Calendar hierarchy.

SELECT  Hierarchize
   (Ascendants 
      (LinkMember 
         ([Date].[Date].[July 1, 2002], [Date].[Calendar]
         )
       )
    ) ON 0
FROM [Adventure Works]

The following example use the LinkMember function to return the default measure in the Adventure Works cube for the ascendants the July 1, 2002 member of the Date.Date attribute hierarchy in the Fiscal hierarchy.

SELECT  Hierarchize
   (Ascendants 
      (LinkMember 
         ([Date].[July 1, 2002], [Date].[Fiscal]
         )
       )
    ) ON 0
FROM [Adventure Works]

Release History

17 July 2006

Changed content:
  • Updated syntax and arguments to improve clarity.
  • Added updated examples.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft