How to add previously deleted CSV columns in Power Query?

0

After you use Power Query to load a CSV file, it only shows the columns you chose when you first created the query.

What if you suddenly want to start using a column you previously deleted in the query?

While Power Query's Advanced Editor can be used to modify the code that controls that, is there an easy way to do so through the UI?

For example, if you previously removed the dummy column from the following CSV file, and now you want it back:

Name    ID      dummy   Number
John    1234    1       324234
Steve   1230    2       124536
Deb     1293    3       968578

Compare to Text Import where all you have to do is click Edit on the query and run the wizard again.

Excel's Text Import Wizard

LWC

Posted 2019-10-26T09:44:39.183

Reputation: 263

Answers

0

The Power Query window includes an Applied Steps pane where you can review and edit the query. You can select the step where you removed the column and either edit it (click gear button next to step name) or delete that step and re-create it.

Mike Honey

Posted 2019-10-26T09:44:39.183

Reputation: 2 119

I've accepted but it's - not your fault, of course, a non user friendly to do so, what with having to track the specific step – LWC – 2019-10-29T17:57:02.033

Thanks. I come at it from the other end of the telescope - it's amazing for me to have a WYSIWYG data transformation tool, where you can jump to any step and see how the data looks before and after. – Mike Honey – 2019-10-30T21:24:52.177

The Applied Steps is great! But it doesn't mean there shouldn't be a straightforward way to do what this question asks. Also, it doesn't seem to solve cases of adding brand new columns.

– LWC – 2019-10-31T00:15:24.210

You could post or upvote it as an idea here: https://excel.uservoice.com/

– Mike Honey – 2019-10-31T09:21:29.137

Good Idea, done!

– LWC – 2019-11-01T20:32:46.597