Power Query M code
let
Source = YourTable,
ColumnsToKeep = List.Select(Table.ColumnNames(Source), each Text.Contains(_, "Sales")),
Selected = Table.SelectColumns(Source, ColumnsToKeep)
in
Selected
Keeps only the columns whose name contains a given text pattern, removing everything else.
let
Source = YourTable,
ColumnsToKeep = List.Select(Table.ColumnNames(Source), each Text.Contains(_, "Sales")),
Selected = Table.SelectColumns(Source, ColumnsToKeep)
in
Selected
Change "Sales" to whatever substring identifies the columns you want to keep.
Browse all 145 snippets in the Power Query M Code Snippets, or search the library for something similar to Keep Only Columns by Name Pattern.