Export (0) Print
Expand All
Expand Minimize

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.


Mtd( [ Member_Expression ] )

Member_Expression

A valid Multidimensional Expressions (MDX) expression that returns a member.

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]
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft