Column Order when Downloading Data

Userlevel 2

Hi all.

I’ve created a relatively simple look for a client. It has more than 70 columns: 4 measures, 16 table calculations, and 50-odd dimensions.

The thing is, the columns have to be displayed in a specific order. And that order has the 16 table calculations shown first, and the 4 measures randomly interspersed among the dimensions. This actually works OK so far: I just visualized the data as a table and drag-and-dropped the columns to the right places.

But the whole reason for the bizarro order is that after visually inspecting the data, the client needs to be able to download the data, and the downloaded data needs to be in the exact same format. And when I download the data, instead I get columns in the order they’re shown in the underlying data: dimensions first, followed by table calculations, and measures at the end. And the dimensions aren’t even in the right order, because I had to jump around when I first added them.

Is there a way around this? Maybe something I can do differently? I know Looker is designed with cases like this in mind because the docs on downloading includes sentences like this:

This is often preferred when data is being fed into another tool for processing.

Thank you so much! This is day 2 of using the tool and question #2 in the forum; I really appreciate the Looker community.


Best answer by Dawid 16 July 2020, 15:04

View original

12 replies

Userlevel 7
Badge +1

This is definitely an important feature. I believe that when you use the Download, the query runs in the background but it doesn’t go through the visualisation layer (if we’re talking about csv) therefore the columns you re-organised are never treated by that step.

It’s an important feature that the download but not sure how it could be implemented. Probably allowing the data to go through visualisation layer only if it’s a table to get the ordering.

Definitely a feature request worth looking into! Thanks Benjamin for raising it!

Userlevel 2

I have this same use case. We need this feature for importing into other systems.

Are there any workarounds for making the downloaded export file columns appear in the same order as the visualization table?

Userlevel 7
Badge +1

Have you tried building the Look in a way that your data comes in an order you want without any changes?

Userlevel 2

That would be ideal, and please correct me if I’m wrong, but measures and table calculations can’t be re-ordered.

Userlevel 7
Badge +1

But the order in which you select and build your measures will be reflected in the export. Unless you need to mix the position of measures & calculations, then in this case we still have the same problem

Userlevel 2

Yes, unfortunately measures, dimensions and calculations all need to be mixed. This is for an import into an external system with no flexibility.

Workaround will be doing this outside of the system with awk.

Hi, I also have the same case. A workaround is to create new dimensions instead of using table calculations, but it’s not ideal because we will use those dimensions in only 1 Look.


Please share if there is any progress in the matter. Thanks!

Definitely would like to add a +1 to this as a feature request. I have a client request for a dashboard that places measures in the middle of a table, but they are pushed to the right end of the table when downloading as a CSV. 

Same issue. This has created a major issue for our various clients, who depend on a certain order of columns (mixed dimensions and measures in their downloaded Excel) for processing through their systems.

Userlevel 4

This is the feature request


First log into the FR portal by clicking “Product Idea?” in your help menu in your instance, then navigate to that case. Add your +1 to upvote!

I’m having this issue. Ideally, if I’m able to rearrange table calculations so they are not at the end of the report, then I would assume it would reflect that in the export.

I am not able to change the column order with table calculation in the data section, but I am able to do so in the visualization section. If this functions in the visualization and the actual looker report, then I would appreciate an enhancement so it does the same in the export. The order of which the columns are in, for my case, is very important. Having to tweak it outside of Looker should not be the end solution. 

I have the same issue, where I want Looker to download the file as Excel with the column order being the order in the Visualization because measures and dimensions are mixed.