Sample calendars

The IBM® Cognos® Analytics base samples include a set of sample calendars that you need to set up relative date analysis.

The sample calendar data modules and their sources can be found in the Team content > Calendars folder.

The following samples are available in this folder:
  • Gregorian calendar data module.

    Contains dates from January 1, 1950 to December 31, 2050.

  • Fiscal calendar data module.

    Contains dates from March 1, 1950 to February 28, 2050.

  • Fiscal calendars folder.

    This folder contains 12 sample calendar data modules. Each of these calendars covers 100 years (1950 to 2050), but the dates in each calendar start in a different month. The month in the calendar name indicates the start of a fiscal year. For example, the 02. February 1 data module is the sample calendar for the fiscal year starting on February 1.

    The 03. March 1 calendar is the same as the Fiscal calendar, and the 01. January 1 calendar is the same as the Gregorian calendar.

  • Retail 4-5-4 calendar data module.

    Contains dates from January 31, 2016 to January 30, 2023. The retail calendar is based on the National Retail Federation (NRF) 4-5-4 Calendar. You can also generate a custom retail calendar. For more information, see Creating a custom retail calendar.

  • Source files folder.

    This folder contains the source .csv files for the calendars data modules. The files contain dates for the associated calendars.

Columns and dates in the sample calendar data modules

The dates are listed in the following columns:

TheDate
The main reference date for each row.
PD_TheDate
Previous day from TheDate. The dates in this column are one day prior to TheDate.
ND_TheDate
Next day from TheDate. The dates in this column are one day after TheDate.
dYear
The date that is the beginning of the year to which TheDate belongs.
Tip: The fiscal calendars are denoted by the year in which the calendar ends.
PY_TheDate
Previous year for TheDate. The dates in this column are one year prior to TheDate.
NY_TheDate
Next year for TheDate. The dates in this column are one year after TheDate.
dQuarter
The date that is the beginning of the quarter to which TheDate belongs.
PQ_TheDate
Previous quarter for TheDate. The dates in this column are one quarter prior to TheDate.
NQ_TheDate
Next quarter for TheDate. The dates in this column are one quarter after TheDate.
dMonth
The date that is the beginning of the month to which TheDate belongs.
PM_TheDate
Previous month for TheDate. The dates in this column are one month prior to TheDate.
NM_TheDate
Next month for TheDate. The dates in this column are one month after TheDate.
Important: Do not modify the column names in the sample data modules and .csv files because that would break the relative date filters in the sample calendars.

Predefined filters in the sample calendar data modules

The sample calendars data modules contain a set of predefined date filters. These filters can be used to perform relative date analysis in different types of visualizations.

The following filters are predefined in the sample calendars:

  • 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 view the expression associated with each filter by clicking Edit filter from its context menu.

You can also create your own custom filters. For more information, see Creating relative date filters.