1 Reply Latest reply on Jul 24, 2016 3:39 AM by Simon Runc

    How to add connecting lines for segments of my bar chart?

    Nabanita Kayal



      I need to add connecting lines to the bar chart, as shown below:


      The next image will show you what I've created so far -



      Please assist in modifying my chart to match the first image! (evidently, I'm a beginner and have lots to explore in Tableau)


      Thanks in anticipation,


        • 1. Re: How to add connecting lines for segments of my bar chart?
          Simon Runc

          hi Nabanita,


          So one way is to use a Dual Axis chart, where you have one as stacked bar and one as stacked lines.


          So first I take your calculation, for %age of Total using the Quick Table Calc (as you've done) and bring it again onto the Rows shelf (a short cut for this is to hold CTRL and drag the existing measure to the right...this way Tableau brings it in again)


          Once I have this I can then set the mark-type to line. Now the problem here is that, by default, unlike bars, lines are not stacked...but we can change that here


          I then Dual Axis (and sync Axis). I then also make the line chart the first one (switch the order) so the lines go behind the bar. In my example I've left the colouring on the lines, but you can change this to detail if you only want them in a single colour.


          Hope that makes sense, and does the job, but please post back if not