3 Replies Latest reply on Nov 10, 2012 7:20 AM by Shawn Wallwork

    Changing Label

    Magdalena Zielinska

      Hi,

       

      Does anyone know how to add diferent label to bar chart?

       

      As you can see in the attached file I created stacked bar for three different measures. Percentage values is visible from Y axis so I don't need to duplicate them into label. Instead I would like to have exact measure values (not percentage) for each group on each bar.

       

      Is there any possibility to do it?

       

      Thank you,

      Magdalena

        • 1. Re: Changing Label
          Shawn Wallwork

          Magdalena, you've stumbled onto one of those times when it would be great if we could use Measure Values & Measure Name in a calculation like this:

           

          CASE [Measure Name]

          WHEN '% of Marked Up along Table(Across)' THEN SUM([Marked Up])

          WHEN '% of Total Profit along Table(Across)' THEN SUM([Profit])

          WHEN '% of Total Sales along Table(Across)' THEN SUM([Sales])

          END

           

          Putting this on the Label shelf would give you what you want. But alas, we don't have access to these variables. So the best I could come up with was to do them as a series of Mark Annotations with the line and line end set to none. Tedious, but doable. (See attached). FYI, to get the sums to be available in the annotation, you'll need them on the Level of Detail shelf.

           

          Zen Master Joe may have a better solution, he usually does.

           

          Magdalena, the good news is V-8 will allow you to easily put multiple labels on charts so your problem should be solved Q1-2013. Hope this helps,

           

          --Shawn

           

          PS: That case example was intended for the Devs that have been known to lurk around these parts.

          1 of 1 people found this helpful
          • 2. Re: Changing Label
            Joe Mako

            You are facing this limitation because of your data structure, if you have the capability to transform your data prior to Tableau, then this limit goes away.

             

            The Measure Names/Measure Values pills are performing a unpivot of your data in Tableau, and has limits, but if you perform an unpivot of your data prior to Tableau, then you can get the result and interaction that you want.

             

            For example, if your data source looks like this:

             

            Groupvalue 1value 2value 3
            a123
            b456
            c789
            d101112

             

            reshaping it to look like:

             

            GroupMeasureValue
            avalue 11
            avalue 22
            avalue 33
            bvalue 14
            bvalue 25
            bvalue 36
            cvalue 17
            cvalue 28
            cvalue 39
            dvalue 110
            dvalue 211
            dvalue 312

             

            would enable the analysis that you want.

             

            See http://kb.tableausoftware.com/articles/knowledgebase/preparing-excel-files-analysis for more details and http://www.tableausoftware.com/public/blog/2012/08/columns-and-rows-any-difference-1628 for a great explanation.

             

            There are other routes as well if that is not an option, but transforming your data prior to Tableau is ideal in this case. Another route would be to use a static scaffold data source (helpful if you have large data and consistent contents), and data blend your data onto this, another option is to use a dashboard, one sheet for each aggregated continuous pill.

             

            See the attached for some examples.

             

            There are other potential routes depending on your constraints or situation.

             

            Shawn, I am not sure I see how multiple pills on the label in v8 would help in this situation, each mark would have 3 numbers, but I did not use v8 for long, I may be missing an option.

            • 3. Re: Changing Label
              Shawn Wallwork

              Thanks Joe.

               

              Magdalena, make sure you scroll all the way to the bottom of that first link Joe provided. It links to the Andy's Excel Reshaper, which is the ultimate solution to your issue.

               

              --Shawn