5 Replies Latest reply on Aug 4, 2016 5:29 PM by Mark Angelo Ruiz

    How to sort column names in .TDE

    Mark Angelo Ruiz

      I'm confused why Tableau automatically sorts column names of TDE. I have a datasource (SQL) and I sorted 141 columns based on business user requirements. Now I have to do extract of my SQL datasource to create TWBX. However, after the extract, tableau just sorted the column names in ascending A-Z order.


      Is there any way to keep the order of column names from datasource to TDE?


      EDIT: Please go to this thread with similar idea.





      Mark Ruiz

        • 1. Re: How to sort column names in .TDE
          Ashish Chaudhari

          Hi Mark,


          I guess you should be using below option to get the data the way you sorted as per your requirement. Try that and Let me know. Right click on the dimension and choose select sort by as "Data source order".



          Thanks and Regards,

          Ashish Chaudhari

          • 2. Re: How to sort column names in .TDE
            Mark Angelo Ruiz

            Thanks Ashish for taking take to reply. However, the requirement is to sort the column names of underlying data. Please see comparison below and the temporary solution.


            Here is tableau's sorting of column names: ascending A-Z sorting


            But what the business users need to see is this order below. We added prefixes to force tableau to sort the column names. However, this is too much of manual input if we have 141 or more columns.


            Hope this clarifies. Will welcome any suggestions/solution to this issue.



            Mark Angelo Ruiz

            • 3. Re: How to sort column names in .TDE
              khalid norat



              When you click go to the edit datasource view, you have the option to sort fields by data source order this is sorting the field headings and not the field data.


              Hope this works for you

              1 of 1 people found this helpful
              • 4. Re: How to sort column names in .TDE
                Ashish Chaudhari

                I think that's the way to do it. What I have shown was at the column level sort or sheet level.


                Your solution is cool. That will do the sorting at the global level. Thus we will not have to do the sorting at sheet level.



                • 5. Re: How to sort column names in .TDE
                  Mark Angelo Ruiz

                  Thanks Khalid for the straight forward recommendation. However I think the issue goes beyond just by sorting by datasource. I'll give you few examples and the desired output.


                  As you suggested, we can sort by datasource in "source tab",


                  We can also sort by datasource in the left most pane.


                  However, when exporting to excel, it sorts alphabetically A-Z: (Product, Product Line, Product Type) vs the sorting of datasource: (Product Line, Product Type, Product).

                  Now, when we view the underlying data, we see the issue. Tableau sorts its own way thus the issue in export/copy.