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: PeriodsToDate
Category: Time
Description: The PeriodsToDate function returns a set of siblings from the same level as the supplied member. The returned set starts with the first sibling and ends with the supplied member.
Syntax: PERIODSTODATE( [«Level»[, «Member»] ] )
Technet Link: MDX PeriodsToDate Function




The query below returns the first sibling at the Month level up to the supplied member of February 2004.
 

SELECT
      {} ON COLUMNS,
      PeriodsToDate([Date].[Fiscal].[Fiscal Year], [Date].[Fiscal].[Month].[February 2004]) ON ROWS
FROM
      [Adventure Works]
 
 

 
The query below returns the first sibling at the Date level up to the supplied member of February 22, 2001.
 

SELECT
      {} ON COLUMNS,
      PeriodsToDate([Date].[Fiscal].[Month], [Date].[Fiscal].[Date].[February 22, 2002]) ON ROWS
FROM
      [Adventure Works]
 
 

 
 

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