Date Parts

Use the date parts to extract logical date/ time groupings from the date/ time hierarchy, and display those groupings in the visual. For instance, you may want to display a list of months, but find that you only have a single date hierarchy, containing a list of dates. In this case, you can open the date/ time sub-menu and select the 'Full Month' date part. The months will be extracted from the date hierarchy and added to the visual.

This is useful if you are working with a datasource that doesn't already have the classic date/ time groupings, like year, quarter, month, and week. In this scenario, you can simply select the relevant date part from the date/ time sub-menu.

Selecting a date part will produce a custom blue chip, which will appear in the item selection menu. The corresponding date part will appear in the visualization.

How to Select a Date Part

To access date parts, open the sub-menu for the dateKey hierarchy; simply select the required date part from the list.

Date Part Hierarchy vs Filter

You can add the date part as a hierarchy selection or as a filter selection. When adding the date part as a hierarchy selection (from the Dimensions panel as shown in the image above), all of the date part's elements are added to the visual, as in the grid below. This is a good way to view trends over time, or review a list time periods.

To add a date part as a filter selection, open the dateKey sub-menu from the Filter panel, as shows below.

A date part filter selection will add date part's elements to a filter, which will automatically be placed on the canvas. You can then select the exact date or time period by which to filter the query. This is useful if you want to review data for a specified time-frame, rather than produce a trend or list of dates.

Date Part Options

You can select from the following date parts:

Year: display all years.

Full Quarter: display all quarters by name (i.e., 2008-Q1)

Full Month: display all months in date-time format (2008-01, 2008-02, and so on), listed by year.

Month Name: display all months by month name, with no differentiation by year.

Full Week: display all months in date-time format (2008-W01, 2008W-02, and so on), listed by year.

Date: display all dates.

Quarter Number: display all quarters by number (1, 2, 3, 4), with no differentiation by year.

Month Number: display all months by number, from 1 - 12, with no differentiation by year.

Week Number: display all weeks by number, with no differentiation by year.

Day of Month: display all days of the month, from 1 - 31, with no differentiation by year or specific month.

Hour: display all hours, if the hierarchy is time only or date-time

Minute: display all minutes, if the hierarchy is time only or date-time.


Month Name Hierarchy Selection

Here, the Month Name date part was chosen as a hierarchy selection, adding all month names to the visual. As explained about, the Month Name date part does not differentiate between years, so this grid displays data by month name for all years:

Month Name with Year Filter

Next, the Year part was added as a filter selection; this produced a Year slicer, allowing the user to filter the visual by year:

Month Name with Year and Quarter Filters

Next, the Quarter Number date part was also added as a filter selection. The year 2010 was selected from the Year filter, and Q3 from the Quarter filter; the result is that the visual is filtered to display the month names for the months in Q3, 2010: