Date-Time Calculations

Date-Time calculations are used to add date-time groupings to the visual if the data model being queried does not already contain the needed groupings. In this case, the user can open the sub-menu of the dateKey hierarchy (or a number of other date-time hierarchies), where they can select the required calculation.

Some date-time calculations add the relevant dates or periods to the visual, while others produce a slicer that is automatically added to the canvas. In the latter scenario, the user then makes the required date selection from the slicer, and visual will be filtered to show all the dates or periods according to the selected date-time calculation.

This functionality provides a way for users to add complex date-time calculations with just a few mouse-clicks, giving the flexibility to display a range of date-time groupings in the visual, without any need to construct complex formulations.

How to Select a Date-Time Calculation

To access the Date-Time calculations, open the sub-menu for the dateKey hierarchy, or other date-time hierarchy; the date-time calculations supported by the given hierarchy will be listed. Simply select the required calculation.

Date-Time Hierarchy vs Filter

You can add a date-time calculation as a hierarchy selection, or as a filter selection. The former option allows you to add the date-time calculation to the visualization as any other hierarchy. This is useful if, for instance, you want your visual to display a trend over time. For example, the visual below displays expenses for promotions; adding the full month calculation as a hierarchy added the months to the y-axis, so the visual displays a monthly trend:

The latter option allows you to filter your visualization by the selected date-time calculation. This is useful if you want your visual to display precise information within a given time-frame. For example, the visual below displays expenses for promotions by manufacturers; adding the full month calculation as a filter enables filtering by specific month, so the user can filter out data from other months:

Review of Date-Time Calculations

The calculations that are exposed depend on the type of date/ time hierarchy that you select. If you select a dateKey hierarchy, the calculations will be based on days. However, a number of Time Intelligence columns support calculations for other date/ time groupings. If you select the 'full month name' time intelligence hierarchy, the calculations will based on months. Alternatively, select the 'week' hierarchy to choose week-based calculations, the 'quarter' hierarchy to choose quarter-based calculations, or the 'year' hierarchy to choose year-based calculations.

Continue reading for details about each of the date-time calculations.

Last Period

Use these options to display the last x time periods prior to the current period. Selecting a Last Period calculations adds the corresponding date/ time elements to the visualization.

Last Day: display the last day prior to the current day.

Last 7 Days: display the last 7 days.

Last 14 Days: display the last 14 days.

Last Week: display the last week prior to the current week.

Last 4 Weeks: display the last 4 weeks.

Last Month: display the last month prior to the current month.

Last 3 Months: display the last 3 months.

Last 6 Months: display the last 6 months.

Last 12 Months: display the last 12 months.

Last 24 months: display the last 24 months.

Last Quarter: display the last quarter prior to the current quarter.

Last 2 Quarters: display the last 2 quarters.

Last 4 Quarters: display the last 4 quarters.

Last Year: display the last year prior to the current year.

Last 3 Years: display the last 3 years.

Period To Date

Selecting a Period to Date calculation adds a parameter slicer to the canvas. From the slicer, select the required date or time period to display data for the given period to date.

YTD: 'year to date' will display a list of time periods from the beginning of the given year, up to and including the selected period. For instance, if the dateKey hierarchy is selected and the given date is May 21, 2019, a list of all dates from January - May 21 will be returned. However, if the 'full month name' time intelligence hierarchy is selected, and May 2010 is selected from the slicer, the visual will display all months in 2010 up to and including May.

The YTD calculation is available for dateKey and full month name hierarchies.

QTD: 'quarter to date' will show a list of dates from the beginning of the given quarter, up to and including the selected date. For instance, all dates from April 1 - May 21, 2019. Alternatively, is the 'full month name' time intelligence hierarchy is selected, the QTD calculation will display the months in the quarter which contains the chosen month, up to and including the selected month. For example, if May 2010 is selected from the slicer, the visual will display April and May.

The YTD calculation is available for dateKey and full month name hierarchies.

MTD: 'month to date' will display a list of dates from the beginning of the given month, up to and including the selected date. For instance, all dates from May 1 - May 21, 2019.

The MTD calculation is available for the dateKey hierarchy only.

WTD: 'week to date' will display a list of dates from the beginning of the given week, up to and including the selected date. For instance, all dates from May 19 - May 21, 2019.

The WTD calculation is available for the dateKey hierarchy only.

Period on Period

Use the period on period functions to see the given member element and the element that is one position before it, in the same grouping level. For instance, if a Quarter on Quarter calculation is selected, and date selected from the slicer is Q2 2010, then both Q2 2010 and Q2 2009 are shown in the visual.

Day-on-Day: display the selected day and the previous day. Available from the dateKey hierarchy.

Week-on-Week: display the selected week and the previous week. Available from the 'week' time intelligence hierarchy.

Month-on-Month: display the selected month and the previous month. Available from the 'full month name' time intelligence hierarchy.

Quarter-on-Quarter: display the selected quarter and the previous quarter. Available from the 'quarter' time intelligence hierarchy.

Year-on-Year: display the selected year and the previous year. Available from the 'year' time intelligence hierarchy.

Day Calculations: from the dateKey hierarchy, each of the above calculations is exposed from the date level. When a calculation is selected, a date slicer is produced; the visual will display the selected date and the date in the previous period. For instance, if Day: Year on Year is chosen, and 2 April 2010 selected from the slicer, the visual will display 2 April 2010 and 2 April 2009.

Full Period

Use the full period functions to see all dates within the chosen time period. For example, if you choose Full Month, and then select August 3, 2010 from the slicer, the visual will display all dates from the month of August, 2010.

These calculations are available from the dateKey hierarchy only. When a Full Period calculation is chosen, a dateKey slicer is added to the canvas; select the required date from the slicer to display all dates.

Full Week: select a date to display all dates in the week of the selection.

Full Month: display all dates in the month of the selected date.

Full Quarter: display all dates in the quarter of the selected date.

Full Year: display all dates in the year of the selected date.

Current Period

Current Period selections show current period of the given level date/ time hierarchy.

Current DateKey Year: shows the current year; available for the Quarter hierarchy.

Current DateKey Quarter: shows the current quarter; available for the Year hierarchy.

Current DateKey Week: shows the current week; available for the Week hierarchy.

Today: display today's date. Available from the dateKey hierarchy and from the 'full month name' time intelligence hierarchy.