3 Replies Latest reply on Nov 20, 2018 8:30 AM by Vincent Baumel

    Line graph with two labels

    Hamel Patel

      Hi,

       

      I would like a label at the end of the chart showing category but then on all other points on the chart i would like a label showing just the profit. Tableau seems to combine the two which i don't want.


      Any ideas?

       

      ive attached a work book.

       

      Thanks,

        • 1. Re: Line graph with two labels
          Vincent Baumel

          Hi Hamel! Is this what you're thinking?

           

           

          If so, there's a pretty straightforward way to get there. I created a calculation called Category Label that looks like this:

           

          This will return a value if it's the first partition in our viz, and it will default to the leftmost point in our line in this case. I replaced the Category label with this new calculation, and cleaned up the labels a bit. Keep in mind that with a legend you wouldn't *technically* need a line label, but if it's what you're after then I think this will solve it for you!

           

          If this answers you're question, please choose 'Correct Answer' so that others can find it if they have the same question.

           

          Thanks,

           

          Vince

          • 2. Re: Line graph with two labels
            Hamel Patel

            Hi, thanks, would this work if i was to change the FIRST part of your formula to LAST to show at the end of the line?

             

            Thanks btw very helpful.

             

            Hamel

            • 3. Re: Line graph with two labels
              Vincent Baumel

              Yes, LAST()=0 will return true for the last partition in your worksheet. If you wanted to clean it up even a touch more, you can do a second calculation for the value, then place them side by side on your label mark:

               

              I just put them on the label like this:

               

              There's tons of ways you can customize labels!

               

               

              -Vince