Tableau Gantt Chart With Start and End Date

In our company, I was working on a project tracking dashboard, and I got a requirement to display the timelines of different tasks. The sales team wanted to see when each task starts and ends so that they can track their progress.

For such data visualizations in Tableau, it is better to use the Tableau Gannt chart. It helps visualize tasks with their start and end dates along a timeline. By plotting tasks as bars that extend from their start dates to their end dates, we can see the project schedule and overall progress in a single chart.

In this Tableau tutorial, I will explain how to create a Tableau Gantt chart with start date and end date to view the duration of tasks.

Create a Tableau Gantt Chart With Start and End Date

To create a Tableau Gantt bar chart with start and end dates, I will use two datasets for different examples. In the first data set, we have the task name, start date, and end date. In the second example, we will use the Tableau superstore dataset to show the start and end dates in a Gantt chart.

Gantt Chart With Custom Task Data to Show Start Date & End Date)

In this dataset, we have three header columns: task, start date, and end date, as shown in the image below.

Tableau gantt chart with start and end date

You can also use the same sample data to create a Gantt chart with start and end dates. After creating the XLSX file, connect it to Tableau and follow the steps below to create the Gantt chart.

  1. First, create a calculation field to get the duration of days between the start time and end time. Enter the calculated field label as “duration” and use the formula below.
DATEDIFF('day', [Start Date], [End Date])
  1. Now, drag Task to Rows, and Start Date to Columns.
Tableau gantt chart with date duration
  1. By default, the start date field will display the date in the Year format. Click on the Start date in the Columns and select Exact date.
Create a Tableau gantt chart with start and end date
  1. In the Marks section, select the change the type from Automatic to Gantt chart.
Use gantt bar chart to show start and end in Tableau
  1. To show the duration of days between start and end on the bars, drag the Duration to the Size card in the Marks section.
Tableau gantt chart with duration between dates
  1. To show the dates (start date and end date) on both sides of the bar, we will use the dual-axis chart. To do this, duplicate the start date in the Columns, then click on the duplicate date and select ‘Dual Axis’.
Dual axis gantt bar chart in Tableau
  1. In the first axis of start date, drag the Start date field to the Label. For alignment, select Label -> Alignment -> Left.
Create a Tableau gantt bar chart with start and end date
  1. To display the end date on the other end, drag the end date to the Label card of the second axis, and then select Label -> Alignment -> Right for alignment.
Show dates in Tableau gantt bar chart
  1. For better visualization, we can also add a task to the Color card in the All Marks section.
Create a Tableau gantt bar with duration of days

With this, we can see the start date and end date at the ends of bars in the Gantt chart. As we hover on the bars, it will display the task name and duration along with the start date and end date.

Gantt Chart With Superstore Data to Show Order Date & Ship Date

In this example, we will use the Tableau Superstore dataset. In this, we will take the Order date and the ship date as the start and end dates. The Gantt chart will show the order and ship date at the ends of the bars.

Connect the Tableau with the Superstore dataset and follow the steps below to create a Gantt chart.

  1. Drag the order ID to the Rows. With this, we will get the orders for which we want to track the order date and ship date. To filter records, click Order ID, then select Edit Filter, select the desired records, and click OK.
Create a Tableau Gantt chart with dates
  1. Now, add the Order date to the columns, and by default, it will be in year format. Click on the Order date in columns and change the format to Exact date.
Display start and end date in tableau gantt chart
  1. After this, change the chart type to Gantt in the Marks section.
  1. To show the duration of days between the start date and the end date, create a formula field “Duration” using the formula below.
DATEDIFF('day', [Order Date], [Ship Date])
  1. Drag the calculated field to the Size card. This will show the length of bars according to the duration of days.
Tableau gantt bar chart with start and end date
  1. To display both start and end dates, we need to create a dual-axis chart. For this, duplicate the order date in the Columns and select Dual Axis.
  1. Drag the Order date to the Label card of the first axis and change the format to Exact date. Then, click on “Label” and select “alignment” as “left“.
Tableau gantt chart with dates
  1. Now, drag the Ship date to the Label card of the second axis. Then, click on “Label” and select “alignment” as “right“.
Show start date and end date in Tableau gantt chart

Now, we can see the Order date on the left and the Ship date on the right side of each bar in the Gantt chart. As we hover over the bar, we can also view the order ID and duration, along with the start and end dates.

Conclusion

In this Tableau tutorial, we have learned how to create a Gantt chart in Tableau using both start and end dates. For this Gantt chart view, we have provided two examples: one with a simple task dataset and another using the Superstore data, which includes order and ship dates.

We also learned how to calculate task duration, use the dual-axis, and display start and end dates on either side of the bars. With this Gantt chart, you can track timelines and visualize overall project progress.

You may also like to read:

Agentforce in Salesforce

DOWNLOAD FREE AGENTFORCE EBOOK

Start with AgentForce in Salesforce. Create your first agent and deploy to your Salesforce Org.

Salesforce flows complete guide

FREE SALESFORCE FLOW EBOOK

Learn how to work with flows in Salesforce with 5 different real time examples.