Home      Functions     Common Solutions      Contact     






MDX Functions:
 
MDX Functions

 
Common Solutions

Common Solutions
 
Resource Links

MDX Books
MDX Related Software
MDX Related Blogs
 
Other Links

Contact Us
 
Microsoft SQL Server Analysis Services Function Page
Function Name: Hierarchy
Category: Metadata
Description: The Hierarchy function returns a hierarchy for a specified member or level.
Syntax: «Level».HIERARCHY
«Member».HIERARCHY
Technet Link: MDX Hierarchy Function




The query below returns the name of the hierarchy for the Q1 FY 2003 member.
 
WITH
      MEMBER [Hier] AS
      [Date].[Fiscal].[Fiscal Quarter].[Q1 FY 2003].Hierarchy.Name
SELECT
      {[Hier]} ON COLUMNS
     
FROM
      [Adventure Works]
 
 

 
The following query returns the default member (All Periods) for the Fiscal hierarchy for the Q1 FY 2003 member.
 

SELECT
      {[Date].[Fiscal].[Fiscal Quarter].[Q1 FY 2003].Hierarchy} ON COLUMNS
     
FROM
      [Adventure Works]
 
 

 
 

 
Copyright 2008 by MDXpert.com.
 
Terms of Use                              Privacy Statement
 
Site Powered By - WinHost.Com