2 Replies Latest reply on Jun 18, 2012 2:08 PM by erik.barkans

    Stacked Bar Question

      Hello everyone -

       

      I have shipments and I am trying to create a stacked bar that shows each segment of the shipment as a part of the total for a given month. 

       

      For example I have data that looks like this:

      Shipment IDPick UpShippedArrived Destination PortDeliveredShipped Month
      123455/1/20125/4/20125/13/20125/17/2012May
      123465/2/20125/4/20125/10/20125/14/2012May
      123475/3/20125/5/20125/12/20125/15/2012May
      123485/4/20125/5/20125/10/20125/14/2012May
      123495/5/20125/5/20125/11/20125/13/2012May
      123505/7/20125/8/20125/17/20125/18/2012May
      123516/1/20126/4/20126/13/20126/17/2012June
      123526/2/20126/4/20126/10/20126/14/2012June
      123536/3/20126/5/20126/12/20126/15/2012June
      123546/4/20126/5/20126/10/20126/14/2012June
      123556/5/20126/5/20126/11/20126/13/2012June
      123566/6/20126/8/20126/17/20126/18/2012June

       

      I usually look at averages of things like pick up to shipped (origin transit time), shipped to arrived destination port (air freight transit time), arrived destination port to delivered (delivery transit time) and I would like to see where the average of each segment adds up to the average total transit time (pick up to delivered) by the shipped month.  So the total bar height would be total transit time where each stack of the bar would be one of my three segments.

       

      Is this possible, I can do it in a pivot table in excel but it seems to be giving me trouble in Tableau. 

       

      When I try and set it up it ends up breaking out each measure on the row shelf and giving me a stacked bar by shipped month.  This is an example work book any help would be greatly appreciated.