Power Query Table Filter: Step-by-Step Guide
In this article
You filter a Power Query table by clicking the filter arrow on a column header and picking the values you want (or by removing blanks and errors, or writing a condition in a custom column). The filter runs every time the query refreshes, so new rows that arrive from the source are filtered automatically instead of needing a manual pass. This works the same in Excel's Get & Data and in Power BI's Power Query Editor; the labels can differ slightly by version and region.
What You'll Need
- Excel with Power Query (Data > Get & Data) or Power BI Desktop.
- A query that already loads a table or range. If you have not built one yet, load your data first with Data > Get & Data > From Table/Range or From File.
- Enough knowledge of your data to know which column holds the values you want to keep, and what those values look like (text, number, date).
- A backup copy of the source if you are working in a shared file, since filters change what gets loaded, not the source.
Step-by-Step
- Open the query in the editor. In Excel, click any cell in your loaded table, go to Data > Queries & Connections, right-click the query in the pane and choose Edit. In Power BI Desktop, use Transform data on the Home ribbon (or right-click the table and choose Edit query). The Power Query Editor window is where every step below happens.
- Check the data types first. On the Home tab, look at the icon to the left of each column header. A column of numbers showing as text (or dates showing as text) will filter wrongly, so click the icon and set the type. Set the type before filtering whenever possible, because changing it after a filter can turn filtered values into errors.
- Click the filter arrow on the column header. A dropdown opens with a search box and a list of unique values. The list is built from the preview rows that have loaded, so if the preview is limited, the list may not show every value in the source.
- Pick your filter. Tick the checkboxes for the values to keep, or untick the ones to drop. Use the search box to narrow long lists. Click OK. The column header now shows a small filter icon, and a new step appears in the Applied Steps list on the right.
- Or use a condition instead of a value list. In the same dropdown, open Text Filters, Number Filters or Date Filters and choose a comparison such as Equals, Contains, Begins With, Is Greater Than, Between or Is Not Null. Choose And/Or to combine two conditions. This is safer than ticking values when new categories may appear later, because a condition keeps working on new data.
- Remove blanks and errors if you need clean rows. The same dropdown has Remove Empty and the error option, and the Home tab has Remove Rows > Remove Blank Rows. Filtering out nulls in a key column is usually the first cleanup step in any query.
- Filter multiple columns for an AND result. Each column filter you add is applied on top of the last, so picking Region = West and then Status = Open returns only rows that match both. There is no built-in OR across two different columns via the header arrows; for that, use a custom column with an Or condition and filter that column to true.
- Rename the step. In Applied Steps, right-click the gear icon or double-click the step name and give it something readable like "Keep West region orders." Anyone opening the query later, including future you, will thank you.
- Reorder if the query misbehaves. Applied Steps run top to bottom. If a filter sits before a type change or a merge, moving it later with the up and down arrows (or dragging) can fix errors and speed up the refresh.
- Close and load. On the Home tab click Close & Load (Excel) or Close & Apply (Power BI). Only the filtered rows are written to the worksheet or data model. Refresh the query later and the filter runs again against the current source data.
Common Mistakes
Filtering the worksheet, not the query. Excel's own AutoFilter on a loaded table does not filter the query. Next refresh restores every row. Always filter inside the Power Query Editor.
Ticking values from a partial preview. If the preview shows only the first thousand rows, values further down may be missing from the checkbox list and quietly excluded when you tick "select all visible." Prefer a text or number condition, or load the full column first and check the list.
Filtering before setting data types. Text "10" and number 10 are different values. Ticking one may drop rows that look identical on screen. Fix types first.
Assuming a filter edits the source. A Power Query filter only controls what loads into Excel or Power BI. The original file, database or workbook is untouched, and the source you are looking at may still show everything.
Expecting the value list to refresh itself. The dropdown list comes from the current preview. If new values appear in the source after a refresh, re-open the dropdown before relying on the list, or switch to a condition-based filter.
Using a case-sensitive Contains in a case-insensitive database. Text filters in Power Query are generally case sensitive even when your source is not, so "open" will not match "Open." Use a custom column with Text.Lower to normalize before filtering.
Tips
Use a parameter instead of a hard-coded value when the filter threshold changes month to month. Create one from Manage Parameters, then reference it in the filter condition so you can update it from the worksheet or the Power BI model without editing the query.
Keep filters near the end of the query, after merges and type changes, so the engine works on the smallest set of rows it can. Some sources, notably databases, can push a filter back to the server (query folding) and make refresh dramatically faster; check whether the step shows as folding-friendly by right-clicking it.
When you need to keep rows based on a list held elsewhere, merge that list into your table and expand only the match, then filter out nulls in the merged column. It keeps the rule in one place.
To see exactly what a filter removed, duplicate the query before you add it (right-click the query > Duplicate) and remove the filter step from the copy.
Troubleshooting
The filter is gone after refresh. Check that the filter step still exists in Applied Steps and has not been deleted or bypassed. Steps can be switched off by clicking the X on the right of the step name; the step stays but stops running.
No rows at all. Undo the last step with Ctrl+Z, then check data types, trailing spaces and case. A Text Filters Equals against a value with a trailing space matches nothing.
Error values appear after a filter. A type change after the filter is usually the cause. Set the type before filtering, or change the type using a locale that matches your source (right-click the column > Change Type > Using Locale).
The value you need is not in the dropdown. The preview has not loaded it. Filter a condition instead, or sort the column and pick the value from the visible rows.
Refresh is slow. Move the filter earlier if the source can fold it, remove columns you do not need before filtering, and avoid filtering on a custom column that depends on another custom column.
The query loads more rows than expected. Another step below the filter may be expanding a table or merging extra rows back in. Open each step in turn and watch the row count in the status bar.
Frequently Asked Questions
Does filtering in Power Query change my original spreadsheet or database?
No. It only changes which rows are loaded into Excel or Power BI. The source stays as it was, so other users and other reports see the full data.
Can I filter on more than one value in the same column?
Yes. Tick as many checkboxes as you need, or use Text Filters > Equals and switch to the advanced option that lets you enter several values joined with Or.
How do I filter two different columns with an OR condition?
The header arrows combine columns with AND only. Add a custom column that returns true when either condition is met, then filter that column to true.
Why does my filter drop rows that look identical?
Usually hidden spaces, different casing, or one value being text and the other a number. Trim and clean the column first, then sort it to spot the differences.
Does the filter apply to new rows added to the source later?
Yes, as long as you refresh the query. The filter step re-runs on every refresh, so it catches rows that did not exist when you set it up.
Should I filter in Power Query or in a PivotTable?
Filter in Power Query when the excluded rows should never load, for example to cut data size or hide sensitive records. Filter in a PivotTable when you want to switch the view without editing the query.