How to use and Create Date Field in Tableau

Tableau recognizes dates that are contained in your source data and allows you to change the level of detail displayed via an auto-generated hierarchy. It is also possible to rearrange date levels by changing the order of date pills on the row or column shelves.

                                              Diagram of combination filter applied to a bar chart

Discrete and continuous time:

You’ve probably noticed by now that some pills are green and others are blue. Similarly, icons can be in blue or green colors. most beginners believe blue pills and icons denote dimensions while green pills are used to display measures. While this is frequently the case, the truth is more subtle. Blue pills/ icons denote “discrete” fields. Green pills/ icons denote “continuous” fields. Dates can be both discrete and continuous. Below Diagram shows Tableau’s default way of displaying time— as discrete time hierarchy.

You can see that time has been discretely segmented in the time series chart by year. Clicking on the plus sign in the quarter pill would cause the date hierarchy to expand to include months, and panes for each quarter would be exposed. Continuous dates don’t discretely bucket time but will cause a drill down to a lower level of detail. Below Diagram shows a similar time series chart with continuous time being used and the level of detail being month.

The green pill on the column shelf in Below Diagram indicates the level of detail being displayed. Notice that there are no panes in view. Time is continuously displayed as an unbroken line.

                                Discrete time series Diagram

                                          Continuous time series Diagram

Tableau’s date hierarchy:

Time can be expanded to more granular levels simply by clicking on the plus sign within the date pill. Experiment with this and note that you can rearrange time buckets just by changing the order of the pills by repositioning them. It’s also possible to change the level of detail displayed by right-clicking on the date pill. This exposes the menu in below diagram.

                                Diagram of changing the date level of detail

The menu includes two different date sections that start with year. The first group provides discrete date parts. The second group provides continuous date values. Below Diagram was created by changing the date displayed in by altering the quarter pill to display month.

                                Diagram of time series displaying discrete year-month

In Below Diagram note the menu option appears twice the first time it appears is, within the discrete date section of the menu. The second time it is in the continuous date section. Explore the menu option in both the discrete and continuous time portions of the menu. The more menu options provide even more granular options for controlling how date and time are presented in your view.

Rearranging time with Tableau:

There are many different date and time combinations that can be displayed. Below Diagram rearranges time to display weekday first, then year. Each day is a discrete time bucket. You can also add a reference line by pane that displays the average sales value for each weekday across all four years. This is one of the ways you can leverage discrete time to provide additional information.

                              Diagram of Rearranging time and applying a reference line

If your data supports very granular views of data, tableau can display details down to the second. This might be particularly useful if you need to analyze click stream data on a website.

Creating customized date fields in Tableau:

                                       Diagram of Creating a custom date

Tableau’s date hierarchy is always available. Even people consuming reports via tableau reader or server can expand time. When hovering your mouse pointer over an axis you will see a small plus or minus sign appearing. Clicking on those signs expands or contracts the date hierarchy displayed.

Designers with tableau desktop can alter tableau’s default date hierarchy by creating custom date fields and then building unique date hierarchies. Making custom date hierarchies requires three steps:

    1. Create a custom date
    2. Create the date hierarchy.
    3. Use the custom date in your view.

To create a custom date, point at a date field on the dimension shelf and right-click. This will expose a dialog box that provides a means for defining a custom date or time element as you see in below diagram.

Create a custom year date by naming the field “year” and defining the date as a discreet year date part. You can also add another discrete date for month. By dragging the custom month on top of the custom year, you can add a new custom date hierarchy. Below diagram shows the resulting date hierarchy.

You can see the custom hierarchy in below diagram on the dimension shelf. The year and month custom dates are displayed in this time series chart. In this way you can change how tableau expands and contracts the dates used in your visualizations.

Tableau’s date facility encourages explorations of data over different time slices because it is very easy to use and also it doesn’t require any special skill to master.

                                  Custom date hierarchy Diagram

Taming Data with Measure Names and Values:

Sometimes your data isn’t clean and it may not be structured in a way that supports the analysis you need to perform. You might also be looking at a data set for the first time and need to scan it quickly to get a lay of the land. Tableau’s measure names and measure values fields help you with all these tasks.

Click For More Information: How to use Date Field in Tableau


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s