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: Dimensions
Category: Other
Description: The Dimensions function returns a hierarchy for a supplied numeric value or a name.
Syntax: DIMENSIONS(«Hierarchy Number»)
DIMENSIONS(«Hierarchy Name»)
Technet Link: MDX Dimensions Function




The query below returns the 0 dimension, which is the Measures dimension. Notice the default measure for Adventure Works is returned.
 

SELECT
      {DIMENSIONS(0)} ON COLUMNS
     
FROM
      [Adventure Works]
 
 

 
The following query uses the Dimensions and AllMembers functions to return all members of the measures dimension.
 

SELECT
      {} ON COLUMNS,
      {DIMENSIONS(0).AllMembers} ON ROWS
FROM
      [Adventure Works]
 
 

 
The query below uses the Dimensions function along with a hierarchy name to return the Name of the Sales Channel hierarchy.
 
WITH
      MEMBER [SalesChan] AS
      DIMENSIONS('[Sales Channel].[Sales Channel]').Name
SELECT
      {[SalesChan]} ON COLUMNS
     
FROM
      [Adventure Works]
 
 

 
 

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