Skip to content

Latest commit

 

History

History
51 lines (38 loc) · 1.11 KB

hierarchy-mdx.md

File metadata and controls

51 lines (38 loc) · 1.11 KB
title description author ms.author ms.reviewer ms.date ms.service ms.subservice ms.topic ms.custom
Hierarchy (MDX)
Hierarchy (MDX)
kfollis
kfollis
kfollis
02/17/2022
sql
analysis-services
reference
mdx

Hierarchy (MDX)

Returns the hierarchy that contains a specified member or level.

Syntax

  
Member expression syntax  
Member_Expression.Hierarchy  
  
Level expression syntax  
Level_Expression.Hierarchy  

Arguments

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

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

Examples

The following example returns the name of the Calendar hierarchy in the Date dimension in the AdventureWorks cube.

WITH  
MEMBER Measures.HierarchyName as  
[Date].[Calendar].Currentmember.Hierarchy.Name  
SELECT {Measures.HierarchyName}  ON 0,  
{[Date].[Calendar].[All Periods]} ON 1  
FROM [Adventure Works]  

See Also

MDX Function Reference (MDX)