5 Replies Latest reply on Apr 6, 2018 7:12 AM by Sasha Hanna

    Sort text table on multiple fields

    Maarten Van den Broeck

      Hi all,

       

      I want to sort columns (fields) in a text table (see below). The sorting should be primary on column 1, but if column 1 has 2 equal values, it has to further sort on column 2. Very similar to the excel function 'custom sort' where you can add layers of sorting.

      The table was created using the 'text table', meaning thatin Tableua, my columns are 'measure names', Country is on row.

       

      In the below table, the table is sorted on Column 1, but when there are multiple zeros in Column 1, values should be sorted based on Column 2

      CountryColumn 1Column 2
      a012
      b010
      c03
      d05

      e

      16
      f14
      g245
      h312

       

      So the table should look like this:

      CountryColumn 1Column 2
      a03
      b05
      c010
      d012

      e

      14
      f16
      g245
      h312

       

      How can this be done in Tableau 10?