Recently, we were analysing the order timeline of product shipment. We wanted to know how long it took for orders to be shipped after they were placed in different shipping modes.
As a solution for this, we used the Gantt bar chart, in which we can show the duration of hours between the order and the shipping for selected orders.
In this blog, I will explain what a Gantt chart is in Tableau and how we can use it in scenarios such as displaying a timeline of each order’s shipping duration on the chart.
What is a Gantt Chart in Tableau?
In Tableau, a Gantt chart is used to represent the duration of activities or tasks over a timeline. The duration can be between hours, days, weeks, months, and years.
In the Gantt chart, each task is represented by a horizontal bar, where the position of the bar shows when the task starts, and the length of the bar shows how long it lasts.
Create a Gantt Chart in Tableau
In Tableau, there are two ways we can create a Gantt chart: one is manually by selecting dimensions and creating a calculated field. The other method is using the built-in Gantt bar from the list in the Show Me tab.
Create a Gantt Chart Manually in Tableau
In this example, I will use the Superstore data to show the average time duration to ship the order in each shipping mode.
Connect the Tableau desktop with Superstore data and follow the steps below.
- Drag the Ship mode to the Rows, and Order Date to the Columns.

- Click on the Order date and select Measure > Minimum.

- Here, the Order date and shipping date are in date format. To calculate the hours between these dates, we need to create a calculation field.
Click on the Analysis tab and select a calculative field. Enter the label for the field and enter the formula below.
DATEDIFF('hour',[Order Date],[Ship Date])

- In the Marks section, change the format to Gantt and drag the calculative field to the Size card in the Marks section.

- In the time duration, we have to show the average of hours for that click on the calculative field in the Size and select Measure Sum > Average.

Check out: Waterfall Chart in Tableau<