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: Axis
Category: Metadata
Description: The Axis function returns a set of tuples on the specified axis.
Syntax: AXIS( «Numeric Expression» )
Technet Link: MDX Axis Function




The query below displays the set of tuples that is on axis 0. The SetToStr function is used to turn the set of tuples into a string so it can be returned as a string value.
 
WITH
      MEMBER [Measures].[SetOfTuplesOnTheColumnsAxis] AS
      SetToStr(AXIS(0))
SELECT
      {[Sales Reason].[Sales Reason].[Magazine Advertisement]} ON COLUMNS,
     {[Measures].[SetOfTuplesOnTheColumnsAxis]} ON ROWS
FROM
      [Adventure Works]
 
 

 
The query below returns the set of tuples that are on Axis 0. In each cell that is returned on the column axis (in this case, Calendar Year), a set is returned as a string (via the SetToStr function).
 
WITH
      MEMBER [Measures].[SetOfTuplesOnTheColumnsAxis] AS
      SetToStr(AXIS(0))
SELECT
      {[Date].[Calendar].[Calendar Year].Members} ON COLUMNS,
      {[Measures].[SetOfTuplesOnTheColumnsAxis]} ON ROWS
FROM
      [Adventure Works]
 
 

 
 

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