A Gantt chart is a great way to show processes over time and are typically used for Project management.
Here is the help tableau site's how to article on how to create one > Link
The image below is from the link;
But how do you take this to Gantt chart to next level? Can you also include the status of your current project? How many hours are expected in the current step as a total? What is the percent of completion? These are all questions you should consider when you are building a dashboard for this use case.
In an open office hours a couple of weeks back, (sorry it's an internal session and not external) a user had a use case for a Gantt chart. It gave me the idea of how to take your Gantt chart to the next level.
I created the below Tableau Public dashboard here.
I made up the data for this dashboard. Projects can have specific goals, tasks and then deliverables. I used 4 project categories for this data; information gathering, design, testing and deploying the dashboard. You can expand / collapse each category to see the tasks.
One important thing to note is that I used the color blind palette I discussed in a previous blog article here for the tasks. I had to do a little dual axis magic to get the circles in their current location.
Steps for the Expandable Collapsible Part of this Dashboard;
I had to right-click on the Dashboard Cycle column for this dataset and select Create > Set.
Then I created the below calculated field called Tasks;
If [Dashboard Cycle Set] then [Steps]
Else '→ '
END
I put this on my worksheet after the Dashboard Cycle on the Rows shelf.
On the dashboard, I created a Set Action including this set as shown below;
Dual Axis Magic
To put the circles to display status on the Gantt worksheet I had to create an inline calculated field on the Columns shelf.
This is when you right-click and select New Calculation. I typed Min(-20) and right-clicked on this pill to select Dual Axis.
I changed this second Marks card to a circle and kept the Day(Create Date) pill as a Gantt Mark type. I had to decrease the negative number to 170 to get the circles before the first Gantt Bar.
This is crazy because one is a number and the other is a date! I used my standard developer philosophy of "mess with it until it works" for this chart.
The other nice thing to enhance a Gantt chart is to insert a reference line for the current day. This will show your user visually where the project is.
I have a Date Parameter in this dashboard because I am using dates from earlier this year.
I also wanted to use this for a Status column. This will help to identify Late project tasks.
Status
IF [Due Date] < [Date]
AND [Completed %] < 100
then 'Late'
Else ''
END
This calculated field was used for a label next to the project status circles.
I then created one last calculated field for the color of these circles.
CompletedColor
IF [% Completed]=100 then 'Complete'
ELSEIF [Status]='Late' then 'Late'
ELSEIF [% Completed]>=1 then 'In Progress'
Else 'Pending'
END
And that's it! Feel free to download the Tableau Public workbook to see the details. Hopefully I will have a video soon in my YouTube channel for this topic > https://www.youtube.com/@Techtipsgirl
Comments