← Learn/Power BI

Learn Power BI

40 lessons · Power Query · Modelling · Visuals · Advanced

0/40 completed
Lesson 1 of 10

Remove & Select Columns

Removing unwanted columns is the first step in any Power Query pipeline. Table.RemoveColumns drops named columns; Table.SelectColumns keeps only what you specify and discards the rest. Both return a new table — Power Query transforms are non-destructive. Dropping columns early reduces memory usage and improves refresh performance.

💡

Use Table.SelectColumns over Table.RemoveColumns when the output schema is fixed — it protects against new source columns silently appearing in your model.

Code ExamplePower Query M
let
    Source = Excel.CurrentWorkbook(){[Name="Sales"]}[Content],

    // Keep only the columns you need
    Clean = Table.SelectColumns(Source, {
        "Date", "Region", "Product", "Revenue"
    }),

    // Or remove specific unwanted columns
    // Clean = Table.RemoveColumns(Source, {"Notes","InternalID","Legacy"})
in
    Clean

Simulator

Before

DateRegionProductRevenueNotesInternalIDLegacy
2024-01-15UKWidget A4500n/aXZ001Y
2024-01-22USWidget B7200XZ002N

After

DateRegionProductRevenue
2024-01-15UKWidget A4500
2024-01-22USWidget B7200

Notes, InternalID and Legacy dropped — model is cleaner and faster.

Quick Check

Which function keeps ONLY the columns you list, discarding all others?