I have a workbook which uses a MS SQL connection. I have organized my query and sorted the columns in my query itself.

Eg.

My Query fetches the data and displays it like this. The order of columns as they are returned by sql query is like this

Name , Assignee , Modified Date , Description , Time

The same format is used in Tableau workbook itself. Its a discreet report. I am not creating any graphs or anything , its simply a table kind of report. The order of columns as mentioned above is exactly the same in workbook too.

But when i publish the workbook to my tableau server and then use the Data option while viewing the workbook in my browser. The data that gets exported has a different order of columns. And the next pop up window which shows the data also has columns re ordered.

Assignee, Description, Modified Data, Name , Time

i am trying to figure out how to maintain the order of columns that i have specified in my report.

Can anyone help me out with this. Does anything needs to be done in the Tableau Desktop or Tableau Server ?

I think Tableau Support team should consider adding this feature in a future release. .. The data export is very important for some of our customers. They should get what they see in the reports. Exactly the same that is.

Could you explain the workaround with some details please? So we rename the fields to : 1fieldname_dimension1, 2fieldname_dimension2, 3fieldname_measure1, 4fieldname_dimension3, 5fieldname_measure2, ...

Then how do I get the above fields in order? By default, it seems Tableau mix-up the dimension and measure fields in the excel-output so the prior ordering in the database side does not work.

This seems to still be an issue today. Has Tableau found a way to be able to manage this manually? Right now it looks like it is in Alphabetical order. My team wants the most important columns up front.

Do you know if changing anything in the worksheet preview you see when adding the relationships when you start out would help? You seem to be able to hide columns etc.

I just discovered that you can change the column order in Tableau Desktop and when you check the underlying data it is correct. (not a solution we love but that works) However here comes the kicker. When you publish your report to the server so that others can view it using a link it totally goes back to some sort of alphabetical order. Where do we go to put in the request to get this fixed?

You'll notice this thread is pretty old...and nothing has been done about it...that should tell you something

Part of what you're seeing is a fairly conscious decision about what type of features to work on. Tableau has never focused on "export" like older tools do. We believe (pretty firmly) that Tableau should not be used as an ETL tool.

Export was very important for older tools because quite often they were simply used to extract data from a source...then OTHER tools (Excel) were pointed at that data to solve problems and answer questions. That's not what Tableau is about...we'd rather spend our development time on things that move the platform ahead vs. re-hashing legacy stuff. This cold hard truth is just my opinion as someone who's been around for a while and seen this question come up before, btw.

This workaround might also help you, however. Not 100% sure as I've never tried it myself.

You'll notice this thread is pretty old...and nothing has been done about it...that should tell you something

Russell is almost certainly right. But since "Hope springs eternal!": Tableau did (or is about to) add Autosave functionality to their product! This was a feature request I posted almost six years ago. So don't give up. Promote, badger, cajole ... whatever, they will hear you. (They actually do listen really well. The problem is they don't generally acknowledge your feature request.)

I do agree with your point and appreciate Tableau's forward development away from the norm of older tools. However, I do not think exporting the fields in the order of the data source is asking for too much. I am sure many users have this need. I have worked on and completed many dashboards with beautiful visualizations but the nature of operations in my business requires an exportable CSV at times.

With all the things that tableau does well, exporting fields in a logical order seems elementary.

Russell, these are fair points, but I would argue that export is not an ETL function.

csv is a valid report type. I agree you need to point users to visualizations and working smarter with data, but there's some important reasons for this option, such as data archiving, regulatory requirements to have raw data, importing into other tools. There's also nothing wrong with analysts using Excel or SAS or R or something to do advanced things with the data, alongside the visualization, and they need the data for that. Sometimes your clients don't have Tableau, they have PowerBI, or MicroStrategy or some other thing. Crazy I know, but playing nice with other tools is actually a good selling point. Sometimes you can't just buy expensive licenses for all the clients that need the data, although that's not really a reason for Tableau to work on it, nothing in it for them

Tableau already (I'm looking at v10.1 not sure about previous versions) has "download crosstab" which is a csv file. Why not just switch the tabcmd export to use that output instead. It's already losing all the formatting when you do that, but then, csv doesn't have formatting so that's not relevant.

I don't get why "underlying summary data" is ordered alphabetically anyway. It seems like an internal format, nothing to do with the original query used, and not the desired final format. Why subject users to that arbitrary column ordering decision that they can't control? If "underlying data" were in the query column order, then at least the name "underlying data" would make more sense. Then I could at least change the SQL to change the output