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>)
Arguments
Time_Member | Time dimension member from the default hierarchy |
---|
Examples
The following formula returns the cumulative sum of Item base amount from the beginning of the year 2020 up until Mar 2020. It can be used if the "Time" dimension is left out of the report context.
Sum(
Ytd([Time].[2020].[Q1 2020].[Mar 2020]),
[Measures].[Item base amount]
)
The Next formula returns the cumulative sum of Item base 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].[Item base amount]
)