4 Replies Latest reply on Apr 26, 2018 11:29 PM by Alex C

    Sort columns

    Alex C


      Tell me please, how can i sort one dimension field by another field without aggregation func?

      For example, i have string field "month": jan, feb,  march, april, etc... By default this field sorted alphabetically, but i want so that it is sorted in correct order jan, march, april, etc... So i have the numeric field "month n": 1,2,3, etc..., in accordance with month's name. Finally, i have two fields, looks like: jan - 1, feb -2, etc.
      Now i want to do so that sorting by field "month" is done like by field "month n". And if i change sort (ascending, descending), its always done like by field "month n". PowerBi got such functional, for example.

        • 1. Re: Sort columns

          Hi Alex,


          Did you try the option to sort as per below screenshot:

          • 2. Re: Sort columns
            Ritesh Bisht

            Hello Alex,


            Here is the sample  data-source


            (My DS is not in order but I could see that sort in-order @ Tableau , but in any case you can arrange if it is not in order with the manual option )



            Screen Shot 2018-04-26 at 8.21.36 PM.png

            Screen Shot 2018-04-26 at 8.17.43 PM.png


            STEP 2 : Make use of field Index() as Month-N


            Screen Shot 2018-04-26 at 8.16.04 PM.png



            Now I can sort my actual Month with the help of INDEX field ,  I am sorting the same @ desc order (SEE BELOW)


            Screen Shot 2018-04-26 at 8.19.04 PM.png


            Please set the answer as CORRECT & HELPFUL if it really helped you to sort your query so that it can help others as well.






            • 3. Re: Sort columns
              Alex C

              Thank you.

              This one-time option, and, if i will sort by this field next, it will sorted alphabetically again.

              • 4. Re: Sort columns
                Alex C

                Thank you.

                I would like to do task without unnecessary fields in my visualisation, but guess this is the only option.