Skip to main content
Defines calendars with your own year, quarter, month, and week periods. Omni reads the periods from a calendar table in your database. A common example is the retail 4-5-4 calendar. A dimension uses a calendar through its custom_calendar parameter. For a walkthrough, refer to Set up a custom calendar.
A custom calendar replaces the fiscal calendar for the dimensions that use it. fiscal_month_offset and the fiscal_* timeframes are not available on those dimensions.

Syntax

Properties

object
A map of custom calendar objects. Each key is the name of a calendar. Calendar names must be unique.

Query behavior

When a dimension uses a calendar, Omni joins the calendar view on the date. All timeframes of the dimension share one join. The calendar view does not need to be in the topic, and the join does not cause fan-out.

How periods display

A mapped year, quarter, or month displays the first date of the period, such as Feb 4, 2024. To display 2024, 2024-Q1, or 2024-02 instead, also map year_num, plus quarter_of_year for quarters or month_num for months: These values are strings, so the dimension’s format does not apply. week always displays the first date of the week.
A mapped week ignores week_start_day.

Grouping and sorting

A mapped year, quarter, month, or week groups by the calendar period. Rows sort by the first date of the period. Pivots and drills group by the same calendar period.

Filters

A filter uses the calendar when its value names a period that the calendar maps. A filter that names a specific date uses the Gregorian calendar, because a date means the same thing on every calendar. Filters on a specific period need year_num in the calendar mappings, plus quarter_of_year for quarters or month_num for months. Some filter values have no meaning on a custom calendar and return an error. For example, this Q3 and last january name a Gregorian month or quarter, and a fiscal_* filter names the fiscal calendar that the custom calendar replaces.

Date fill

Date fill on a mapped timeframe adds the calendar’s periods. The query needs a date filter with a start and an end, or a named period such as this year.

Period over period

Period-over-period comparisons in workbooks and dashboard controls compare calendar periods. For example, “previous quarter” on a retail calendar means the previous retail quarter, not the previous Gregorian quarter. Two rules apply:
  • The date filter must name a period, such as this quarter or in the year 2024. A filter on specific dates does not work.
  • The comparison must be a whole number of that period. On a quarter filter, 1 year compares against four quarters ago, but 1 month does not work.

Examples

Retail 4-5-4 calendar
Without year_num, quarters display their first date, and filters on a specific quarter such as 2024 Q3 are not available.
Quarter only