Custom period-to-date

Use custom period-to-date to define a relative time member that is an aggregation from the beginning of a time period to an endpoint within the period.

You must specify whether the period is life-to-date or for a specific to-date period. You then specify target period with offset, and context period with offset.

Life-to-date aggregates data for all time periods to a defined endpoint. The endpoint is defined by the target and context properties.

The target period that you specify affects the granularity of the period-to-date calculation. The calculation ends at the 'close' of the target period, where the close is the last sibling among the descendants. For example, if the current day is January 10, and day is the leaf level, quarter-to-date aggregates January 1 to January 10, if target period is day. If target period is month, quarter-to-date includes all days in the month, January 1 to January 31.

For example, assume a hierarchy with All, Year, Quarter, and Month levels. To define a relative time member "Quarter to date, last year" you specify:

  • life-to-date: false
  • to-date period: quarter
  • target period: month
  • target period offset: 0
  • context period: year
  • context offset: -1

This example is illustrated in the following diagram.

Figure 1. Illustration of custom period-to-date example
illustration of quarter to date, last year example

In this example, if the current month is February, and the quarter ends in March, the defined endpoint is February because the target period is month.

To define a relative time member "life to date (target = quarter)", you specify:

  • life-to-date: true
  • to-date period: n/a
  • target period: quarter
  • target period offset: 0
  • context period: year
  • context offset: 0

This example is illustrated in the following diagram.

Figure 2. Illustration of life-to-date example
illustration of life-to-date (target = quarter) example

For life-to-date members, the sub tree of reference members is not generated in the member browser or in the IBM® Cognos® studios.