xTD

The MDX xTD function for Essbase returns period-to-date values.

Syntax

xTD ( [member ] )

Parameters

xTD

Values:

Table 4-141 Time Period Parameters

Parameter Value
HTD History-To-Date (H-T-D)
YTD Year-To-Date
STD Season-To-Date
PTD Period-To-Date
QTD Quarter-To-Date
MTD Month-To-Date
WTD Week-To-Date
DTD Day-To-Date
member

Member specification. Should be a member from the time dimension.

Notes

  • xTD ( [member ] ) is equivalent to PeriodsToDate ( layer, [member]) where layer is assumed to be the value set in the corresponding Dynamic Time Series member in the database outline.

    For example, in Sample Basic, QTD ([member]) is equivalent to PeriodsToDate ( Year.Generations(2) [,member]), because Q-T-D is Generation 2 in the Year dimension.

  • The xTD functions YTD, QTD, MTD, etc. are not relevant for use in aggregate storage databases, because the xTD functions assume that Dynamic Time Series members are defined in the outline. Dynamic Time Series members are not supported for aggregate storage database outlines.

    You can use the PeriodsToDate function with aggregate storage databases in place of the xTD functions.

    For example,

    YTD(May) is equivalent to PeriodsToDate(Year.Generations(1), May)

    QTD(May) is equivalent to PeriodsToDate(Year.Generations(2), May).

Example

QTD([Feb])

returns the set {[Jan], [Feb]}.

QTD([Feb]) is equivalent to PeriodsToDate([Year].Generations(2), [Feb]), because the dynamic-time-series member Q-T-D is defined as Generation 2 of the Year dimension.

HTD([May])

returns the set {[Jan], [Feb], [Mar], [Apr], [May]}.

HTD([May]) is equivalent to PeriodsToDate([Year].Generations(1), [May]), because the dynamic-time-series member H-T-D is defined as Generation 1 of the Year dimension.

Note:

If a dynamic-time-series member is not defined, an empty set is returned.

PTD([Feb]) 

returns an empty set, because the dynamic-time-series member P-T-D is not enabled in the outline.