4 Replies Latest reply on May 22, 2017 2:00 PM by Vincent Baumel

    Stacked bar question

    Laurie Miles

      Hello forum.

       

      Being a newbie to Tableau, I am hoping someone can answer this question about stacked bar charts.

       

      I have created a chart with two measures and one dimension. I used the generated value "Measure Values" (filtered for the two measures) to create a stacked bar chart - which, btw, is the only instructions about creating stacked bar charts I can find on the web. At this point, I can't figure out how to make the bar show one measure as a percentage of the other instead of the two measures stacking on top of each other.

       

      I hope someone can please help. I would also appreciate anyone directing me to tableau instructions on how to create some of the more advanced charts.

       

      Thank you.

        • 1. Re: Stacked bar question
          Vincent Baumel

          This data source is protected by your specific Google Sheets login. Could you repackage the workbook as a .twbx and attach that? My understanding is that your stacked bar chart with table calc labels is actually pretty straightforward to do, I just want to make sure that everything plays nicely with your data :-)

          • 2. Re: Stacked bar question
            Jim Dehner

            Hi Laurie

             

            see the attached

             

             

            This is a dual axis chart --see the link  Dual Axes

             

            Please let me know if you have questions

             

            Let me know if this helped

            Jim

            • 3. Re: Stacked bar question
              Laurie Miles

              Hi Vincent.

               

              I've changed my Google sheet's visibility.  Would you please look at the .twbx when you get an opportunity. 

               

              Thank you.

              • 4. Re: Stacked bar question
                Vincent Baumel

                Okay, there's a couple things I'm noticing. First, the percentages you're after are all within a pretty small percentage:

                That being said, I'm not sure a stacked bar is the way to go here, since a bar representing 1% isn't really going to appear that much different than a bar representing 2% even though it represents quite a BIG difference. Doing a true dual axis would me misleading in this case, since one bar would represent a percentage and the other would represent a population sum. The way to mitigate this would be to even out one of the measurements. Here's one idea:

                What I did here was dual axis a total population graph (% of total, running across the table so that every location shows 100%) and a population of those lacking literacy. I set this second axis to a Gantt bar, and labeled it with a table calculation based on % of total. This way, you're highlighting the important story you're trying to tell. Doing this as a dual axis of population against population would have a bunch of tiny portions and a bunch of big portions. This would only serve to minimize the impact of what you're trying to show.

                 

                 

                Like I said, this is just one idea. I'll attach a packaged workbook so that you can reverse engineer the table calculations. Let me know if this helps!