4 Replies Latest reply on Jul 30, 2018 7:52 AM by Joseph Sauerland

    Grouping colums in a table

    gene shackman

      I have a table with multiple columns. I would like to group some of the columns together, and also have headers that spam several columns. This is what I have

       

      columns.PNG

       

       

      This is what I'd like it to look like

       

      column2.PNG

       

       

      All from data here

      New York State County/ZIP Code Perinatal Data Profile - 2012-2014

       

      Any help appreciated.

        • 1. Re: Grouping colums in a table
          Wesley Magee

          Gene,

          I'm not sure of way that you can do this in Tableau unless the data is formatted as necessary. In this instance you would need a dimension field that would designate a row as "Percent of Births" or "Neonatal Deaths" and you would have a column for the dimension of choice (premature birth, low birth, etc) and a measure for all of the measurable fields.

           

          In short, you would need to pivot the example Excel table you provided. You can do this when you import an Excel file, but if it's in another format it will require a lot more manipulation.

           

          Tableau isn't well designed for tables, but I hope this helps.

          -Wesley

          • 2. Re: Grouping colums in a table
            gene shackman

            This page shows multiple columns with one header. How to get that?

            Headers

            • 3. Re: Grouping colums in a table
              Wesley Magee

              Yes, in the example provided the user just dragging [Region] and [Category] onto the rows shelf. For you to the same you would need a field for calculation type ("Percent of Births" or "Neonatal Deaths") that would identify whether a row was one or the other. You would also need a field for metric type (premature birth, low birth, etc) which would identify what the metric type for each row. If you had these two fields then you could just show them on the rows shelf as a hierarchy.

               

              Rows: [Calculation Type] [Metric Type]

               

              That's how multiple columns with one header is accomplished. Tableau applies the hierarchy for you, but first the data has to be formatted appropriately for it to recognize the hierarchy.

               

              -Wesley

              • 4. Re: Grouping colums in a table
                Joseph Sauerland

                I realize I am a few years late to this discussion, but the link is broken in his above comment:

                 

                This page shows multiple columns with one header. How to get that?

                Headers

                So we can't actually see what he's trying to show us. However, I'm very curious as to your explanation.You say, "You could just show them on the rows shelf as a hierarchy." How do you do this? Adding more than one thing to Rows makes it indented, rather than having a hierarchy of columns.