Chapter 12. Gantt

A Gantt is another mark type that can be used in Tableau. Gantt charts can be used to show duration, activities, and highs/lows.

12.1 Basic Gantt Charts

A basic Gantt chart uses the duration of an event or activity and adds it to Size. This allows you to see how long a particular event or activity lasted.

Problem

You want to show the time span between the order date and ship date in days for every order, sorted by the longest shipping time.

Solution

  1. Add Order ID to rows:

  2. Right-click (Option-click on Mac) and drag Order Date to Rows, then select Discrete date:

  3. Right-click and drag Ship Date to Rows; then select Discrete date:

  4. Your view should look like this:

  5. Add continuous Order Date to Columns:

  6. Next, we need to calculate the number of days between the order date and ship date. This can be done by creating the following calculated field:

Get Tableau Desktop Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.