There are so many things you can do. You won't change the source data. It will only require slight data preparation by adjusting the data structure to enable Tableau produce the charts.
For example you can't produce a Gantt chart in Tableau if you don't have Start Date and End Date as separate fields or a single field. This will help you to caculate Duration in days. You will still need another field combining Manufacturing, Testing and Shipping as subcategories before you can use it to color the chart.
All these can be done quite easily. To start I will like to know few things about your data set. How does your data get into Tableau? Is it through an Excel data source or a SQL database?
I'll take a look and get back to you.
I have a solution for you by using Custom SQL to automatically reshape the data whilst it is being loaded into Tableau.
This is important because data must be in the right format, otherwise certain analysis will be impossible in Tableau.
For this chart to work your data should be in the format below.
The good news is that you don't need to modify your excel file. I wrote a custom SQL code which will do this automatically for you.
The custom SQL script is attached. You have to make sure that the column names and table structure are exactly as the example data you attached.
If you change them then you must update the custom SQL also.
1. Open a new Tableau workbook and click on the Excel file connection.
Select the file and click on the drop down arrow beside "Open" and choose "Open with legacy connection".
2. A new window will open. Double click on "New Custom SQL".
Copy and paste the attached custom SQL into the Edit Custom SQL box and click OK.
3. That's it! Your original data is now reshaped into a format that Tableau can work with it.
4. Check the attached workbook to see what I have done.
Note that I created a calculated field [Duration] in days to help connect the Start Gantt bars to the End bars.
Let me know if you have any questions.
Hope this helps.
Gantt_Chart1.txt.zip 308 bytes
Thank you very much not only for the solution, but also for taking the time to describe all the steps! It is very much appreciated.
Before I posted my question, I had actually tried to solve "my problem" by using pivoting in Tableau, but I got stuck.
You're welcome Kiki. I'm glad it helped.
Could you please mark the answer as correct?