4 Replies Latest reply on Jan 12, 2018 9:03 AM by Beatrix Balogh

    Creating Gantt chart similar to one Excel

    Beatrix Balogh

      So I previously figured out a way to create a Gantt chart in Excel by manipulating horizontal stacked bar charts (e.g. stacking the bars and then setting the color of the bars I don't need seen to be see through), however I am struggling to recreate something similar in Tableau. All of the online tutorials/steps I have found are using categories (e.g. Build a Gantt Chart ).


      My data is showing what time someone arrived on the hour (0-23), and how long they waited for (in mins). I've attached the picture and Excel data file below, but essentially the 0-23 hour arrival would be the vertical axis, and then the waiting time the horizontal axis (stacked on top of their arrival time in minutes to get the fancy alignment).


      Is there a way to do this using Tableau's Gantt chart feature? Or a way to manipulate stacked charts in Tableau similar to Excel? I couldn't even recreate the stacked chart in Tableau, it kept separating into multiple graphs and not giving me the option to stack.


      Thank you for any help!


      Edited to add a Tableau workbook on how far I got. I have the two horizontal bar charts side by side, just can't get them to mesh together.

        • 1. Re: Creating Gantt chart similar to one Excel
          Simon Runc

          hi Beatrix,


          So this is much easier in Tableau...


          If you look at the attached. I dragged ED Arrival (hr) (as Blue Pill) onto Rows, ED Arrival (min) onto Columns (as Green Dimension), changed the mark type to Gantt, and brought Median Boarding Time (mins) onto the size tile...and that's it


          We can even colour it on the Median Boarding Time (mins) (or any other thing you want) with a further drag and drop!


          Hope that is what you were after.

          1 of 1 people found this helpful
          • 2. Re: Creating Gantt chart similar to one Excel
            Beatrix Balogh

            Hi Simon, yes this is what I was looking for! Thank you very much!

            I can't believe how much easier it is in Tableau!


            I do have one follow up question. If I wanted this format, but a few different measures stacked, so not only a box for the Median Boarding Times, but also including Overlap into next day, is it possible to do that?

            • 3. Re: Creating Gantt chart similar to one Excel
              Simon Runc

              Very much so...I think that took me all of 8 seconds!


              So yes you can do this, but the exactly set up will depend how you want them to be stacked.


              In the attached I've used measure names/measure values (pseudo dimension and measure Tableau creates to let us plot, and colour, multiple measures). The way the gantt mark works, is that the gantt line is based on the position of that value, and then size will "streatch" the gantt mark that many unit in the chart. So in the current set up all 3 measures start from the 'ED Arrival (min)' and so only a few marks are visible (as they are as long, or not as line as the Median Boarding Time (mins) so are hidden behind it



              If I bring measure names onto the rows shelf you can see this better



              If you did want to stack them, we could do this, but would require a couple of extra calculations.

              1 of 1 people found this helpful
              • 4. Re: Creating Gantt chart similar to one Excel
                Beatrix Balogh

                The first chart you shared is what I was thinking of. I have some waiting times that go past midnight, thus falling into the "next day", and wanted to show those in a different color as a second box.

                I've made a personal reference note to remember the position vs size/stretch for gantt marks and lines.


                Thank you very much again Simon! This was super helpful!