instead of removing the columns you don’t need, select Choose Columns and uncheck the ones you don’t need. It accomplishes the same thing as deleting them, but if you need to bring any of them back it’s much easier to do (you can just recheck them on the list rather than having to revise the M code directly in the advanced editor)
do step #1 as early in your Power Query steps as possible. This will save time transforming columns that you don’t need.
if you data is coming from a source over which you have some control (e.g., a corporate data warehouse), have those columns removed as far “upstream” as possible, ideally before they hit Power Query at all.
Hi @ezenunez. No, it’s not when initially loading the table, but rather in Power Query once the table is loaded. As @BrianJ said, do this as early in your Power Query transformations as possible (e.g., before any column name changes, data type changes, etc.).
Greg
because I work with a large number of visual learners, here’s some screenshots that might help:
In the Power Query Editor, you can use the “Choose Columns” button:
any column with a checkmark in the box will remain in your report (any unchecked columns will be removed from that point going forward) In this example I am removing Priority and Initial Req. Date because they aren’t needed for this table:
if I later change my mind, I just have to locate the step in my applied steps table, and edit the selection by clicking on the gear icon at the right to open the checklist up again:
And I agree with Brian and Greg - remove the extra columns as soon as possible to help speed things up.
Sorry if my prior post was unclear. If you are not able to eliminate the unnecessary columns “upstream” before they hit Power Query, there are two ways to get rid of them:
Select the columns you want to remove and then click “Remove Columns” (or if you are removing most of the columns, select the ones you wish to keep and then click “Remove Other Columns”
The preferred approach (highlighted in @Greg’s outstanding series as a best practice) is to click “Choose Columns” and then uncheck the ones you wish to delete, per below:
The great things about this approach are that it’s visual, searchable and if you change you mind down the road, you just open this dialog box again and recheck the ones you now wish to retain.