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: ClosingPeriod
Category: Time
Description: The ClosingPeriod function returns the last sibling from the descendants of a supplied member at a supplied level.
Syntax: CLOSINGPERIOD( [«Level»[, «Member»] ] )
Technet Link: MDX ClosingPeriod Function




The query below returns the closing period at the Date level for the Fiscal hierarchy of the Date dimension.
 

SELECT
      {CLOSINGPERIOD([Date].[Fiscal].[Date])} ON COLUMNS
     
FROM
      [Adventure Works]
 
 

 
The following query returns the closing period at the Fiscal Quarter level for the Fiscal hierarchy of the Date dimension.
 

SELECT
      {CLOSINGPERIOD([Date].[Fiscal].[Fiscal Quarter])} ON COLUMNS
     
FROM
      [Adventure Works]
 
 

 
The query below returns the default measure for the closing period at the Calendar Month level for the member CY 2002..
 

SELECT
      CLOSINGPERIOD ([Date].[Calendar].[Month], [Date].[Calendar].[Calendar Year].[CY 2002]) ON COLUMNS
     
FROM
      [Adventure Works]
 
 

 
 

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