4 Replies Latest reply on Mar 12, 2013 2:47 AM by Mel Stephenson

    Dual Axis as Line & Bar Chart

    Ratan Samudrala

      Hi All,

      My client requirement is as below:

      I need to show a Dual Axis as Line & Bar Charts. Where i should be able to see Revenue Vs Spend as Line Chart and 'A' Unit  Vs 'B' Unit as Bar Chart over Date.

      I am able to achieve a Line Chart Revenue Vs Spend using Measure Names and Dual Axis Bar Chart as either 'A' Unit or 'B' Unit not both at a time.

      It would be very great if anybody can respond with some examples for the above.

      Thanks in advance.





      Screenshot is added.

        • 1. Re: Dual Axis as Line & Bar Chart
          Jim Wahl

          I may not understand your problem, but once you choose dual-axis, click Multiple Mark Types on the Marks shelf. Then click on the ">" sign next to rotate through each measure and select a different mark type.


          Of course, if both measures are in the same units, you may want to also synchronize the axis, but selecting this option in the measure pill.



          • 2. Re: Dual Axis as Line & Bar Chart
            Ratan Samudrala

            Hi Jim,

            I have added screenshot for you reference.

            In screenshot, Line chart is done using Measure Values and for Dual Axis Bar Chart, i can only add one measure not both measures at a time.


            Can you please provide your comment for above explanation...

            • 3. Re: Dual Axis as Line & Bar Chart
              Jim Wahl

              OK. I think I understand the problem, which is that you essentially want two measure sets---one for the two measures in the line chart and a second for the two measures in the bar chart.


              I don't think this is easy to do, but of course it's possible. Once approach would be to reshape your data so that the measure name is a column / dimension. This way you can create calculated fields (Tableau's built-in measure names / measure value fields cannot be used in calculated fields):

              Line:  IF [my_measure_name] == 'Total Fractional Spend' THEN [Total Fractional Spend]

                             ELSEIF [my_measure_name] == ''Total Spend' THEN [total spend]



              Bar:   ...


              Now you can put the "Line" and "Bar" measures on the rows shelf, dual axis, ... color by [my_measure_names].


              The trick is to get my_measure_name dimension, and I think you'd probably use custom SQL to do this "reshaping".


              Maybe someone has a better idea. ...



              1 of 1 people found this helpful
              • 4. Re: Dual Axis as Line & Bar Chart
                Mel Stephenson

                Perhaps a good step would be to visit Jonathan Drummey's blog post on this topic and this will show you possible combinations along with how to do each of them and then you can see if one of them listed is what you are looking for.



                1 of 1 people found this helpful