I think it is doable, but it uses the procedure of pivoting your columns:
This can be done in Tableau Prep or in Tableau Desktop (for certain datasource types).
This pivoting is a one-time deal. The Prep pivot cannot as yet be scheduled.
Those caveats aside, just wanted to describe the method which maybe can give ideas.
Basically, we fix the start and end times to the Project, calculate the durations,
and then plot the respective durations on the Gantt.
If it is not possible to Pivot your data, there is an alternative method
that uses a support table:
Please see workbook v10.5 attached in the Forum Thread.
277522pivot.twbx 15.2 KB
Thank you for this! I decided to make some mock data and try to re create this on my own in the way I need the data to be entered, and then to pivot the data. I have run into an issue where the bars are not showing up, only one of them appears. What did you do to get the two others to appear? I have attached the workbook here.
Additionally, when you pivot columns will this cause any issues when updating the data? So if someone were to add a new row to the excel sheet, and then I refresh the data in tableau, will I need to "re-pivot" the columns? Or will it automatically know how to update it?
Book2_v10.5.twbx 11.9 KB
With regards to the bars, I think it was just an issue of
mismatch between the upper and lower case names.
To avoid this, it may be best to do all such comparisons
by converting the string to lower:
IF LOWER([Date Type])="cp start" THEN [cp duration]
ELSEIF LOWER([Date Type])="changed start" THEN [changed duration]
ELSEIF LOWER([Date Type])="execution start" THEN [execution duration]
Likewise with would suggest using LOWER() in the duration calculations.
I stand corrected with regards to the pivoting and refreshing.
I tried it out with a simple example:
-pivoted the columns in Tableau
-added new rows in Excel
-Tableau seemed to update appropriately
You can try it out with the test twb and datafile attached.
So I don't think you will need to do anything but refresh.
So I added this in my original workbook and played around with data, it updated accordingly.
The issue I am running into it when I pivot the data is that the names get replicated.. so as shown in the attached workbook when you hover over items on the main dashboard it is showing the number of records to be multiples of the actual number. there are only ~140 rows in the data source but the pivot is making it show more... any thoughts on a way to exclude duplicated name values? Or maybe the pivot function just will not work for what I need..
Yes, the pivot does create an extra copy of
the Name for each column that is pivoted.
This can be accounted for making a calculated
field of a Count Distinct of whatever Dimension
uniquely defines each row in your true data source.
In this particular case, instead of using SUM([Number of Records]),
you could use COUNTD([Name]).
I demonstrate this on the CP Phase Chart of the
workbook attached in the Forum Thread.
I didn't look at the other graphs, but they will likely
require the same COUNTD of Names, or whatever
other Dimension they are plotting.
277522gantt3.twbx 1.8 MB
Great, thank you for all of your help!
Glad that was helpful.
All the best.