1 Reply Latest reply on Jan 22, 2019 12:27 PM by Data Analyst

    Multiple sorting

    penchalaprahshanth.rasala

      Hello All,

       

      I am trying to sort  right most 3 columns

       

      Example:  Below is the table that I want to sort in this order:-  required then support then optional

       

      and i want something like the below

      for each encounter id we need to first sort the required field all the "Y" needs to be at top for that particular encounter followed by support and optional and the empty cells needs to be at the bottom

       

      Thanks,

      Penchala

        • 1. Re: Multiple sorting
          Data Analyst

          Hi Penchala,

           

          You need create a new combined field to perform the sort here are the steps I followed :

           

          1. Create new calculated field 'calculation1' based based of Required column and below logic .

           

          if ISNULL([Req]) then 0 ELSE 5 END

           

          2. Create new calculated field 'calculation2' based based of Support column and below logic .

           

          if ISNULL([Support]) then 0 ELSE 3 END

           

          3. Create new calculated field 'calculation3' based based of Optional column and below logic .

           

          if ISNULL([Optional]) then 0 ELSE 5 END

           

          4. Create new calculated field 'calculation4' based based of other calculated we have created so far.

           

          [Calculation1] + [Calculation2] + [Calculation3]

           

          5. Added calculation4 on the visualization and sorted it in depending order.

           

          I have referred below video for my reference.

           

          Nested Sorting in Tableau - YouTube

           

          Hope this helps.

           

          Cheers,

          Rahul