2 Replies Latest reply on Apr 6, 2018 3:51 PM by Igor Ribeiro

    Legend from a different field

    Igor Ribeiro

      Hello,

      I have a table like

      IDNameDataDataParentNameParentDataGrandParentNameGrandParent
      1Test1012Parent of Test13Grand Parent of Test

       

      I'm able to create a graph showing three series: Data, DataParent and DataGrandParent.

      However, by default, the series (Legend) is created as "Data, "DataParent" and "DataGrandParent". Instead the legend should come from different fields: "Name", "NameParent" and "NameGrandParent".

      For ID=1, Legend should show "Test", "Parent of Test" and "Grand Parent of Test".

       

      How can I achieve this with Tableau?

       

      Any idea is appreciated.

       

      Thank you!

        • 1. Re: Legend from a different field
          Deepak Rai

          Pl attach some workbook

          • 2. Re: Legend from a different field
            Igor Ribeiro

            Got it to work:

            - Create separate graphs ("Marks")

            - In each Mark, assign the field containing the label related to the data to the "Label" under the appropriate Mark.

            - The graph should now show the Line and the label on it

             

            Now the trick is:

            - On the last Row, click the down arrow and "Dual Axis"

            - The graphs will now be joined and labels will still be there correctly, however axis on left won't match axis on right

            - Right click right axis and click "Synchronize Axis"

            - Right click right axis and click "Show Header" so it disappears

             

            Now there will be only one graph, showing all the lines, with their specific labels.

            1 of 1 people found this helpful