4 Replies Latest reply on Jan 7, 2019 1:34 PM by Zaira Rosas

    Dual axis on Pivot Field Values

    Zaira Rosas

      Hello everyone.

      I'm new on Tableau and I'm trying to do a bar and line dual axis chart, the thing is that both measures are coming from pivot field values (I want to do this because "automóviles" values are considerably higher than the other variables values). I tried doubling pivot field values on rows box but since I need the "automóviles" values represented as line and the other values as bars, I need to exclude one of them in one chart but when I do that, the values disappear from both charts... Can a beautiful and kind soul help me, please? Unfortunately, I cannot share a packaged workbook since it is confidential information from my job

      tbl.jpg

        • 1. Re: Dual axis on Pivot Field Values
          Stephen Rizzo

          How about creating two different calculated fields:

           

          [Pivot Field Values Without Automoviles]: IF [Tipo (pivot)] <> "Automoviles" THEN [Pivot Field Values] END

           

          [Pivot Field Values Automoviles Only]: IF [Tipo (pivot)] = "Automoviles" THEN [Pivot Field Values] END

           

          The use those two fields for the dual axis chart.

           

          EDIT: Please keep in mind that although this will work, the chart will be quite misleading, as bars of a similar height will not represent comparable values.

          • 2. Re: Dual axis on Pivot Field Values
            Peter Fakan

            Hi Zaira,

             

            I mocked up an example using superstore data, but you might need to provide your own dummy data if this example is not sufficient.

             

            Step 1 - I created 2 calculated fields in order to split a dimension into 2 parts - I'm envisaging you might need to do something similar to isolate  'automóviles'.

             

             

            Step 2 - drag onto worksheet to create dual-axis and change second measure to bar or line

             

             

            Viola, a dual-axis viz with values on only one of the marks and the rest on the other.

             

            HTH 2018.3 attached

             

            Peter

            1 of 1 people found this helpful
            • 3. Re: Dual axis on Pivot Field Values
              Zaira Rosas

              OMG Thank you very very much. I'm crying of happiness.

              • 4. Re: Dual axis on Pivot Field Values
                Zaira Rosas

                Thank you very very much. I'm sorry for not selecting your answer as the correct one, but I selected Stephen's because it was published first; anyway, your answer is also correct and very helpful as well. Than you so much.