5 Replies Latest reply on Jul 19, 2016 11:58 AM by Simon Runc

    Using the same axis for multiple row fields


      Hi, I want to combine the different row fields to all be using only 1 axis instead of 3 such that the bottom 2 line charts (predicted and forecast) can be super imposed on the first area chart.

      I didnt include the predicted and actual fields in the measure values because i want to keep those as line charts while lower and upper fields are area charts.

      Workbook with data attached.



      Screen Shot 2016-07-18 at 12.42.11 AM.png

        • 1. Re: Using the same axis for multiple row fields
          Ashish Chaudhari

          HI Jenn,


          Drag them to the Measure shelf.






          Thanks and Regards,

          Ashish Chaudhari

          • 2. Re: Using the same axis for multiple row fields

            Hi Ashish, I want the predicted and actual to be line charts, not area charts as noted above.

            • 3. Re: Using the same axis for multiple row fields
              Simon Runc

              hi Jenn,


              So unfortunately we can't have 2 sets of measure values, as you'd need here to do this easily! However (as always with Tableau) there are a couple of work arounds...both with Pros/Cons.


              So the easy way is to do it with Reference Bands (as shown in the 'Easy Way' tab on the attached). Here we just bring in the 2 measures as lines, and then bring our Upper/Lower bands onto the detail tile, so we can access them in the reference band set up. The Pro is it's easy/quick, the Con being that reference bands are plotted as horizontal/vertical lines...so the effect is a bit blocky (to use the technical term!!)


              So the 'Hard Way' is to build up the entire thing using the Area chart type. For this to work we have to 'Stack' the measures, which is the default behavior of the Area Mark. This means that we need to derive the measures we use, so they get plotted at the right place, and then with some deliberate colouring/ordering of those measures we can get the affect you want.


              The attached shows the basic method, however you'll need to make a few amendments. I've set the weight to 0.05, so you'll need to remove these from the values above (else the 2nr 0.5s will get stacked an the Top level will be 0.1 too high!). I've only done this on the Upper level, but will need doing to the Actaul/Predicted values too (unless you can live with them being 0.05-0.1 out). The other thing is where Predicted goes below actual (there is no situation of this within this example, but sure it'll happen in your real world version). This means the [Actual - SR] and [Predicted - SR] needs to be handled differently (either adding or taking away from the levels below them, depending on which one is higher - basically a negative number will break the illusion!). The Pro if this method is that it looks much nicer, the Con is that it can get pretty complicated.


              I've only got a few mins now so have showed you the basic method, so hopefully you can work it out from here. If not post back and I'll take a more detailed look (might be Thursday now)

              • 4. Re: Using the same axis for multiple row fields

                sorry i cant open the workbook because your workbook is a newer version. Possible to downgrade it to 9.2.7?

                • 5. Re: Using the same axis for multiple row fields
                  Simon Runc

                  Hi Jenn,


                  Possible to downgrade it to 9.2.7?...officially not, but I've edited the XML file so this one should open in version 9.0 and above!


                  Let me know if you are unable to open it