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: Root
Category: String
Description: The Root function returns a tuple that consists of the All members for the optionally supplied cube, dimension, or tuple. If the optional argument is not supplied, the Root function will return the All members for every dimension in the cube.
Syntax: ROOT()
ROOT(«Dimension Name»)
ROOT(«Tuple Exression»)
Technet Link: MDX Root Function




The query below returns the All members tuples from each hierarchy in the cube.
 

SELECT
      ROOT() ON COLUMNS
     
FROM
      [Adventure Works]
 
 

 
The query below returns the default measure for the measures dimension. Because the measures dimension does not have an All level, the default measure is returned.
 

SELECT
      ROOT(Measures) ON COLUMNS
     
FROM
      [Adventure Works]
 
 

 
The query below returns the All members tuples from each hierarchy in the Sales Reason dimension.
 

SELECT
      ROOT([Sales Reason]) ON COLUMNS
     
FROM
      [Adventure Works]
 
 

 
 

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