Relative date analysis

The relative date feature makes it easier to do as-of-date analysis. For example, you can quickly add year-to-date or previous month values to a data container, such as a visualization, cross tab, list, and so on.

To do relative date analysis, a modeler must create a data module in which your data references a calendar. You use this data module as a source for relative date analysis in your data container.

Before you can do as-of-date analysis, the following tasks must be completed:
Administrator
Import the Calendars sample. For information about the Calendars sample, see Importing the base samples.
Optionally, create an as-of-date global parameter and share it with users. You can use this parameter to ensure that a data container always reports as of a specific date. Without this parameter, the data container reports as of the current date.
Modeler
Associate a date column in your data with one of the calendars and associate measures to this date column.
For more information about how to do the previously listed tasks, see Data Modeling in IBM® Cognos Analytics with Watson IBM Knowledge Center .
The calendar data modules contain the following filters:
  • Prior week
  • Prior month (not available in the retail calendar)
  • Prior quarter
  • Prior year
  • Current week
  • Current month
  • Current quarter
  • Current year
  • WTD (week to date)
  • MTD (month to date)
  • QTD (quarter to date)
  • YTD (year to date)
  • Prior WTD
  • Prior MTD
  • Prior QTD
  • Prior YTD
  • Same week last year
  • Same month last quarter
  • Same month last year
  • Same quarter last year
  • Same MTD last quarter
  • Same MTD last year
  • Same QTD last year
You can do relative date analysis in the following ways:
  • Include relative date filtered measures in the data container. In the following example, you would select one of the child measures of the Service Requests measure that references a relative date filter:
    Data module that shows the Service Requests measure and its child measures with relative date filters
  • Add a relative date filter to a query by using the predefined date filters.

If your administrator defined an as-of-date global parameter for your role, all data containers that contain relative date filters or filtered measures report as of the value of this parameter. You can set the value in My parameters My parameters icon. For more information about global parameters, see Using customized parameters.