Timeline Chart in Tableau

As the name suggests, timeline chart in Tableau represents when the notable events are going to occur in the month, year, or even day. Also, the timeline can be used as a calendar showing upcoming dates of interest. Learn Tableau for Data Science

In this article, I am going to mention the steps that required to timeline chart in a Tableau.

Our objective is to build the timeline chart that can be used as a calendar showing upcoming dates of interest. The timeline chart will look like this:

To create this type of chart, we need to have data in the specific format. In this is a case I am going to use the data structure as below which is designed specifically for this task.

Data Summary:
Background Information:
As per the objective of building timeline chart, the following fields are needed in the dataset:

  1. Date: This field provides the dates on which events are going to take place
  2. Events: This field provides the brief description of the events across dates

Following are the steps:

  1. Connect to your data source. For reference, you can recreate the data in the previous image.
  2. Go to Sheet1:
  3.   3. Before we start to build the chart, we need to create the following calculations :
    1.  “Default Min”: The calculation is- MIN(0)
    2. “Today”: This shows today’s date. The calculation is- Today()
  4. Now, drag the “Date” field to “Columns” and “Default Min” field to “Rows” shelf
  5. Convert “Date” field to “Continuous”
  6. Next, make the “Date” field as discrete by selecting “Exact Date” option to show all the date values
  7. Drag “Events” fields to “Detail” marks card and change the type of the chart from ‘Automatic” to “Shapes”
  8. In the next step, we need to filter out the dates where there are no events scheduled. To apply a filter, drag “Events” fields to “Filter” shelf and select as shown in the snapshot:
  9. Since some of the dates have passed, and because most events are not scheduled more than a few months in advance, we will add a relative date filter to only show the next 90 days.
    To do so, drag the Date dimension to the Filters Shelf and choose “Relative Date”.
    This is how the chart looks like after applying the filter:
  10. Next, we need to add today’s date as a reference line. To add reference line, select the x-axis and do a right click over it
  11. In the “Reference Line” window, make the selection as shown in the snapshot
    This is how the chart looks like after adding reference line:
  12. To make the chart visually more appealing, we can do the following mentioned formatting changes:
    1. we can format the “zero lines” on the view to give the timeline itself a customized look
    2. hide the “Default Min” header by right-clicking the Y-Axis and deselecting “Show Header”
    3. Increase the size of the dots, and drag the fields as follows:
      + “Events” field in “Color” card
      + “Date” field in “Label” marks card
      + “Events” field in “Label” card
  13. Finally, the timeline chart looks like this:


About the Author

Leave a Reply

Be the First to Comment!

Notify of