Skip to Content
Tableau Desktop Cookbook
book

Tableau Desktop Cookbook

by Lorna Brown
September 2021
Beginner to intermediate
684 pages
15h 47m
English
O'Reilly Media, Inc.
Book available
Content preview from Tableau Desktop Cookbook

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:

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Tableau Desktop - A Step-by-Step Guide for Beginners

Tableau Desktop - A Step-by-Step Guide for Beginners

Anil Batra

Publisher Resources

ISBN: 9781492090106Errata PageSupplemental Content