4 Replies Latest reply on Sep 18, 2016 4:47 AM by Eileen Lee

    Grouping different bars together

    Eileen Lee



      I am on Tableau 9 and have a chart below, which is filtered down to 2 Targets - Orange for Individuals, and Blue for 15+. Where there is a Title of the same date/day and time and showing more than 1 Target, e.g. what we see in Rows 1 and 2, Rows 3 and 4, is it possible to combine the 2 bars such that they overlay each other?  This might involve a lot of other steps to recreate this, but any help is appreciated. Thanks!


      By the way, why is there an inconsistency where we see some Titles of the same date/day and time and showing more than 1 Target in the same pane, but other split up? Same goes if i remove the Target dimension from Rows, we see some bars stacked and others are not.


        • 1. Re: Grouping different bars together
          Jeff D

          Hi Eileen, if I understand your question, Tableau will combine adjacent rows if the values are same.  In your example, Rows 1 and 2 have different values (for the Combined Field, Target, and Rtg%), so they can't be merged into a single row.  Here's a simplified version to help you see why Rows 1 and 2 can't be combined:


          Regarding your question about "inconsistency": if you look at the last two rows starting with "WAKE" (above), they're the same except for Target, so when you remove Targets, those rows will be combined since the columns have the same values and can be combined.


          Getting back to your original request, I've taken a first pass by recreating the Combined Field (removing Rtg% and adding Start time), removing the Target  pill from the Rows shelf, moving the Rtg% pill to the marks card (and probably a few other things), with the result looking like this:



          I've attached my workbook so you can play with this.

          • 2. Re: Grouping different bars together
            Eileen Lee

            Hi Jeff,


            Thanks for the explanation! I now understand why the bars are sometimes and sometimes not.


            May I know if it is still possible to list the Rtg% column and have the bars combined+sorted in descending order based on this column? From what you have said and what I have played around so far, having Rtg% in Rows shelf will split have the columns split up once more than 1 Target is selected.


            Coming back to the workbook that you have helped me with, I have updated the sorting to be by Rtg%. The sorting seem to only work if and only if I select 1 Target. When 2 Targets are chosen, it doesn't sort as well. Screenshot below. I have gone to Analysis to turn the Stack Marks to "Off", but the sorting issue I have is regardless whether this is on or off.




            Once again, I appreciate on your advice and help!

            1 of 1 people found this helpful
            • 3. Re: Grouping different bars together
              Jeff D

              Hi Eileen,


              Two rows with different Rtg% values will not be combined.  I worked around this by moving that dimension from the Rows shelf to the Marks card, so that you can still see the values.  This also allows you to select any number of targets (take a look at my workbook).


              In your last screenshot, I don't quite understand the issue; if my comments here don't address them, please provide more details.

              • 4. Re: Grouping different bars together
                Eileen Lee

                Hi Jeff,


                Sorry I got confused earlier on, and hence the screenshot. All's great now! Thanks a lot!