Mtd (MDX)
Returns a set of sibling members from the same level as a given member, starting with the first sibling and ending with the given member, as constrained by the Year level in the Time dimension.
Syntax
Mtd( [ Member_Expression ] )
Arguments
- Member_Expression
A valid Multidimensional Expressions (MDX) expression that returns a member.
Remarks
If a member expression is not specified, the default is Time.CurrentMember.
The Mtd function is a shortcut function for the PeriodsToDate function at the month level. That is, Mtd(Member_Expression)
is equivalent to PeriodsToDate(Month,Member_Expression)
.
Example
The following example returns the sum of the month to date freight costs for Internet sales for the month of July, 2002 through the 20th day of July.
WITH MEMBER Measures.x AS SUM
(
MTD([Date].[Calendar].[Date].[July 20, 2002])
, [Measures].[Internet Freight Cost]
)
SELECT Measures.x ON 0
FROM [Adventure Works]
See Also
Reference
Sum (MDX)
MDX Function Reference (MDX)
Help and Information
Getting SQL Server 2005 Assistance
Change History
Release | History |
---|---|
17 July 2006 |
|