2 Replies Latest reply on Apr 3, 2013 7:47 PM by Teresa Case

    Dynamic labeling

    Teresa Case

      Hi,

       

      I was wondering if anyone could help me with dynamic labeling.  I have attached my tableau chart so you can see...basically If I change the title (in the filter section) I would like the labels to change based on what relate to each title.

       

      The data is laid out in the following way:

       

      title               comp_title1     comp_title2     comp_title3

      book                    15                   20               25

      magazine              20                 26               30

      TV                         100               89               63

       

      so, for example for:

      title:     "Book" - comp_title1 = life of pie, comp_title2 = 50 shades, comp_title3 = lord of the rings

      title:     magazine - comp_title1 = mens health, comp_title2 = womens own, comp_title3 = Time Out

      title:     TV - comp_title1 = modern family, comp_title2 = scrubs, comp_title3 = Friends

       

      I currently create a graph on excel, and based on a vlookup on a particular cell, it changes the comp_titles accordingly.

       

      Is there a way I can do this on Tableau?

       

      Thanks in advance.

       

      Teresa

        • 1. Re: Dynamic labeling
          Jim Wahl

          Hi Teresa,

           

          Your data format is not 100% clear to me, but my hunch is that you want to reshape your data.

           

          For example, in the Tableau png you posted, you have measure names (comp_title1, comp_title2, ...). Usually, this isn't ideal. instead you'd want to plot the value and put comp_title_name on the color shelf.  you can do this if you make your data "tall" instead of "wide". (Tableau generally works best with tall data, but data generated for humans is often wide.)

           

          A tall version of your data might look like:

           

          title       comp_title_name    value

          book     life of pie                15

          book     50 shades                20

          book     lord of the rings       25

          magazine  ...

          magazine ...

          magazine ...

          .....

           

          Tableau has an Excel plugin for reshaping data or you can automate it with custom SQL.

           

          It's not clear to me where the titles "life of pie" are stored in your dataset.

           

          If you can post some sample data and/or packaged Tableau workbook (twbx), it should be straight forward to get you what you need.

           

          Jim

          1 of 1 people found this helpful
          • 2. Re: Dynamic labeling
            Teresa Case

            Thank you very much Jim.  I've re-arranged the data as you suggested and it works perfectly now!  Thank you for your time!

            Teresa