Filtering in Power Query keeps only the rows you want and drops the rest before the data reaches your workbook or data model, so you get faster refreshes and cleaner tables. You filter using the arrow button in a column header, which opens a checkbox list plus options like Text Filters, Number Filters, and Date Filters. Everything you click is recorded as a step in the Applied Steps list, which means you can see, edit, or remove it later. The steps below use Excel's Power Query Editor (Data > Get Data); the same logic applies in Power BI Desktop's Power Query Editor, though menu labels can differ slightly by version, device, and region.
What You'll Need
- A table, range, or external connection loaded into Power Query. In Excel, go to Data > Get Data and pick your source, then choose Transform Data rather than Load.
- Power Query Editor open, with the Queries pane on the left and Applied Steps on the right.
- A clear idea of the row you want to keep, for example a region name, a date cut-off, or a value range. Vague goals produce filters that are hard to maintain.
- For text filters, know the exact spelling and capitalisation used in the column. Power Query is case-sensitive in many comparisons.
Step-by-Step
- Open the query you want to filter. In Excel, click Data > Queries & Connections, then double-click the query to open Power Query Editor. In Power BI Desktop, use Home > Transform Data. The preview grid in the middle shows the current state of your data; the Applied Steps pane on the right shows every transformation so far.
- Check the column's data type before filtering. Click the small icon to the left of the column header. If a numeric column is typed as Text, number filters will behave oddly. Set it to Whole Number, Decimal Number, or Date as appropriate, and accept the prompt to replace the existing step. Filtering after correct typing avoids many confusing results.
- Click the filter arrow in the column header. A dropdown opens with a checkbox list of values. The top of the list shows the filter options; the bottom shows the distinct values found in the column. For a very large column, you may need to click Load more or search the list.
- Clear the Select All checkbox, then tick only the values you want. Click OK. Power Query keeps the ticked rows and adds a new step such as "Filtered Rows" to Applied Steps. Note that the dropdown loads a limited set of values; if a value you need is missing, use a text filter instead of hunting through the list.
- Use the typed filter menu for ranges and patterns. Open the arrow again and choose the submenu that matches the data type, for example Text Filters or Number Filters. Options include Equals, Does Not Equal, Begins With, Ends With, Contains, Is Greater Than, Is Less Than, and Between. Enter the value in the dialog and click OK. A Between filter is the quickest way to keep a date range or a numeric band.
- Remove blank and error rows. Open the arrow and untick (null) or (blank) to drop empty records, or use the option to remove empty entries from the menu. Error rows appear in red and can be filtered out the same way; do not leave them in, because they break later steps.
- Combine filters one column at a time. Each filter adds its own step. To filter several columns, repeat steps 3 to 5 for each. Steps run in order, so if you change the data type later, revisit the filters above it.
- Edit or delete a filter step. Click the gear icon next to the filter step in Applied Steps to reopen the dialog and change the values. Click the X to delete the step entirely. Deleting a step is the cleanest way to undo a filter; reordering steps by dragging can produce errors if the column no longer exists at that point.
- Verify the row count. The status bar at the bottom of the preview shows the row and column count before and after the filter, which is a quick sanity check that you kept the rows you intended.
- Close and load. Click Home > Close & Load (Excel) or Home > Close & Apply (Power BI). The filtered table loads to a worksheet or the data model, and every refresh re-applies the filter automatically.
Common Mistakes
The most frequent problem is filtering on the wrong data type. A date column stored as text will not sort or compare correctly, so ranges behave unpredictably. Another common error is using the checkbox list for large tables: the dropdown may show only the first batch of distinct values, so a value that exists can appear missing. Use a Text Filters > Equals filter instead. People also forget that Power Query filtering is case-sensitive for text, so "north" and "North" are different values. Finally, many users filter the output table in Excel rather than the query; a manual row filter on the loaded table does not update on refresh and can hide rows that the query is actually returning.
Tips
Name your filter steps clearly if you plan to share the file; right-click the step and choose Rename so a colleague can see what was filtered. Prefer Contains or Begins With over long checkbox lists when the source data changes often, because new values are included automatically. To exclude a single unwanted value, use Does Not Equal rather than ticking every other value, which breaks as soon as new entries appear. If a filter uses a value you might change later, consider adding a parameter query and filtering against it. Finally, keep your filters near the top of Applied Steps, before column removal and merging, so later steps work on a smaller, cleaner set.
Troubleshooting
The filter removes every row. Check the data type and the exact spelling in the column. Numbers with leading spaces or non-breaking characters will not match a plain number filter; trim the column first with Transform > Trim.
A value is missing from the checkbox list. The list is limited. Use Text Filters > Equals and type the value, or use a Contains filter.
Refresh fails with an error after filtering. A step may refer to a column that no longer exists because an earlier step changed. Open the failing step, clear its value, and reapply the filter. Also check the data type has not changed at the source.
The workbook is slow. Too many separate filter steps add up. Replace several-value checkbox filters with a single Contains filter where possible, and filter early before merging tables. If you are unsure whether the file is large or the connection slow, test by loading only a sample; the Data Load dialog offers this in many versions.
The filter worked yesterday and not today. The source data likely changed format, for example dates arriving as text. Reset the data type on the column and re-run the filter step.
Frequently Asked Questions
Does filtering in Power Query change the original data?
No. Power Query works on a copy in memory; the source file or database is not modified. Only the loaded output table or model changes.
Can I filter using a value from a cell or another query?
Yes, by creating a parameter or a query that returns a single value, then filtering against it in the filter dialog or by editing the step's formula. This is more advanced than a fixed filter.
Can I filter multiple values at once without ticking boxes?
Yes, use Text Filters and the does not contain or begins with options where the pattern suits, or create a filter against a list. Ticking boxes is fine for a handful of values but does not scale well.
Why does my filter show zero rows after refresh?
Usually the value no longer exists or its type changed. Open the filter step's gear icon and check the stored values, then widen the filter.
Do filters apply to both Excel and Power BI?
The concept and most options are the same because both use Power Query Editor. Button labels and menu names can vary by version; look for the same filter arrow on the column header.