All eazyBI for Jira eazyBI for Confluence Private eazyBI

Ytd

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.

A shortcut function for the PeriodsToDate function that specifies the level to be Year.

Syntax

It returns the set of time periods from the beginning of the year up until the current period (displayed/selected in the report)

Ytd(Time_Member_Expression)

Arguments

Time_Member_Expression
MDX expression that returns a Time dimension member from the default hierarchy.

Examples

The following formula returns the cumulative sum of sales amount from the beginning of the year 2024 up until Mar 2024. It can be used if the "Time" dimension is left out of the report context.

Sum(
  Ytd([Time].[2024].[Q1 2024].[Mar 2024]),
  [Measures].[Sales amount]
)

The Next formula returns the cumulative sum of sales amount from the beginning of the year up until the current member (displayed in the report). This formula can be handy if the "Time" dimension is used in the report context (rows, columns, or pages).

It would display meaningful results if the "Time" dimension is expanded to quarter or deeper levels.

Sum(
  Ytd([Time].CurrentMember),
  [Measures].[Sales amount]
)

See also

Adding standard calculations based on selected measures.