2 Replies Latest reply on Jul 15, 2018 1:03 AM by Anne Brown

    Split list into multiple rows

    Anne Brown

      Hi,

       

      Not sure if this is even possible, however, i have a dashboard which contains a row of countries (49 in total), is it possible to split the view of that list, so there are 15 countries/flags per row?

       

      Rather than at the moment where i have to scroll across

       

      Tableau Public

       

       

      current view...

       

      looking for something like....(with 3 lines)

        • 1. Re: Split list into multiple rows
          luisa.bez

          Hi Anne,

           

          You can create a Trellis chart using the CASE function. It enables you to fully control where each flag goes.

           

          I have created a calculated field called Row with the following formula:

           

          CASE [Country]

          WHEN 'Australia' THEN 1

          WHEN 'Austria' THEN 2

          END

           

          The actual formula is much longer, but I abbreviated it to demonstrate the principle. When Tableau scans your [Country] dimension, it will find Australia and will assign it to Row 1. When it finds Austria, it will assign it to row 2. Next, you have to define the columns that these countries go to so they don't overlap. The calculated columns field follows the same logic:

           

          CASE [Country]

          WHEN 'Australia' THEN 1

          WHEN 'Austria' THEN 1

          END

           

          Both countries/flags will now be displayed beneath each other (two rows, but same column). Ryan Sleeper has explained the principle really well in this blog.

           

          I've attached the workbook with the full formula.

           

          Please mark this answer as correct if it helped you to close the thread.

           

          Best,

           

          Luisa

          • 2. Re: Split list into multiple rows
            Anne Brown

            Brilliant!

             

            Thanks very much Luisa, that's perfect