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: CurrentMember
Category: Navigation
Description: The CurrentMember functon returns the current member during iteration along a specified hierarchy.
Syntax: «Hierarchy».CURRENTMEMBER
Technet Link: MDX CurrentMember Function




The query below returns the ID for the currentmember for Product Line members.
 
WITH
      MEMBER [Measures].[CurrMemID] AS
      [Product].[Product Line].CurrentMember.Properties("ID")
SELECT
      {[Measures].[CurrMemID]} ON COLUMNS,
      {[Product].[Product Line].Members} ON ROWS
FROM
      [Adventure Works]
 
 

 
The following query returns the unique name for the currentmember for Product Line members.
 
WITH
      MEMBER [Measures].[CurrMemID] AS
      [Product].[Product Line].CurrentMember.UniqueName
SELECT
      {[Measures].[CurrMemID]} ON COLUMNS,
      {[Product].[Product Line].Members} ON ROWS
FROM
      [Adventure Works]
 
 

 
 

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