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: Ytd
Category: Time
Description: The YTD function returns a set of siblings from the same level as the supplied level. The set consists of the first sibling up to and including the supplied member.
Syntax: YTD( [Ā«MemberĀ»] )
Technet Link: MDX Ytd Function




The query below returns a set of months starting with January 2003 and ending with July 2003.
 

SELECT
      {} ON COLUMNS,
      YTD([Date].[Calendar].[Month].[July 2003]) ON ROWS
FROM
      [Adventure Works]
 
 

 
The query below returns a set of dates starting with January 1, 2004 and ending with January 15, 2004.
 

SELECT
      {} ON COLUMNS,
      YTD([Date].[Calendar].[Date].[January 15, 2004]) ON ROWS
FROM
      [Adventure Works]
 
 

 
 

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