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: Current
Category: Navigation
Description: The Current function returns the current tuple in a set during iteration.
Syntax: «Set».CURRENT
Technet Link: MDX Current Function




The query below returns the unique name for Product Line members using the Current function.
 
WITH
      MEMBER [Measures].[CurrentTuple] AS
      GENERATE([Product].[Product Line].CurrentMember AS
      [ANamedSet], [ANamedSet].Current.Item(0).UniqueName)
SELECT
      {[Measures].[CurrentTuple]} ON COLUMNS,
      {[Product].[Product Line].Members} ON ROWS
FROM
      [Adventure Works]
 
The above query uses the Generate function for iteration since the Current function will only work during iteration.
 

 
 

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