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: Wtd
Category: Time
Description: The WTD 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: WTD( [Ā«MemberĀ»] )
Technet Link: MDX Wtd Function




Since the WTD dimension is contrained by the Time level weeks, and the Adventure Works date dimension does not have any attributes that have a type of weeks, we are unable to provide a working sample. However, if an attribute was typed as weeks, in the Date dimension, this query would return a set with a single member (1). This set would start at week 1 and ending with week 1 (January 3, 2004).
 

SELECT
      {} ON COLUMNS,
      WTD([Date].[Calendar].[Date].[January 3, 2004]) ON ROWS
FROM
      [Adventure Works]
 
If you run the above statement in SQL Server Management Studio, you would receive the following error: Executing the query ... Query (1, 8) By default, a week level was expected. No such level was found in the cube. Execution complete
 

 
 

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