To filter data in Power Query, use the filter arrow on any column header, choose the values or condition you want, and then click OK. For more control, use the filter menu's Text Filters, Number Filters, or Date Filters options, or write a custom filter with the formula bar. Filtering removes rows you don't need before the data loads into Excel or Power BI, which keeps your model smaller and faster.

What You'll Need

  • Excel 2016 or later (Windows or Mac) or Power BI Desktop. Power Query is built in; no separate install is required.
  • Data loaded into Power Query: select your table and use Data > From Table/Range in Excel, or Get Data in Power BI.
  • Basic familiarity with the Power Query Editor window, including the Applied Steps list on the right.

Step-by-Step

  1. Open the Power Query Editor. In Excel, click any cell in your table and go to Data > From Table/Range. In Power BI, use Home > Transform Data to open the editor. Menu labels can differ slightly by version, device, or region.
  2. Find the column you want to filter. Each column header has a small filter arrow on the right side. Click it to open the filter menu.
  3. Choose a quick filter. The menu lists the distinct values in that column with checkboxes. Clear the (Select All) box, tick only the values you want to keep, and click OK. This is the fastest way to filter by exact values.
  4. Use a condition filter for ranges or patterns. For text columns, open Text Filters and pick a condition such as Equals, Begins With, Contains, or Does Not Equal. For number columns, use Number Filters (Greater Than, Less Than, Between). For date columns, use Date Filters (After, Before, Between). Enter your value and click OK.
  5. Remove blanks or errors. The filter menu has separate checkboxes for (null) and (Blank) and for error values. Untick them to exclude those rows. This is often the quickest way to clean messy data.
  6. Filter by a cell value (optional). Right-click a cell containing the value you want, then choose Text Filters > Equals (or the matching filter type). Power Query builds the filter for you.
  7. Write a custom filter (advanced). In the filter menu, choose Text Filters > Custom Filter or Number Filters > Custom Filter. You can combine conditions with And/Or. For full control, type a formula in the formula bar, such as = Table.SelectRows(#"Previous Step", each [Sales] > 1000). Press Enter to apply.
  8. Check the Applied Steps list. Each filter adds a step named "Filtered Rows." Click a step to review it, click the X next to it to delete it, or drag steps to reorder. Deleting a step removes that filter.
  9. Load the filtered data. In Excel, click Close & Load > Close & Load To to choose a table or connection. In Power BI, click Close & Apply. Only the filtered rows are loaded.

Common Mistakes

  • Filtering after loading instead of in Power Query. Filters applied in the worksheet or report do not reduce the data model. Filter in Power Query to keep the model lean.
  • Forgetting that filters are case-sensitive in some conditions. Text filters like Equals may treat "Apple" and "apple" differently depending on the connector. Test with a small sample.
  • Filtering on a column that later changes type. If you change a column's data type after filtering, the filter step may fail. Set data types before filtering.
  • Assuming filters update automatically. Filters are static snapshots of the values at the time you applied them. New values added to the source will not appear unless you refresh and the filter includes them. Use condition filters (e.g., Greater Than) rather than value checklists when the data changes often.
  • Deleting the wrong step. Removing a filter step also removes any later steps that depend on it. Check the Applied Steps order before deleting.

Tips

  • Rename filter steps in the Applied Steps list (right-click > Rename) so you remember what each one does.
  • Use the formula bar to copy a filter formula and reuse it in another query.
  • Filter early in the step order to reduce the rows processed by later steps, which speeds up refresh.
  • For text columns, use Contains rather than Equals when values have extra spaces or inconsistent casing.
  • To filter multiple columns at once, apply filters one column at a time; each adds its own step.

Troubleshooting

  • The filter arrow is missing. The column may be part of a grouped or pivoted table. Expand or unpivot first, or check that the query is not in a special view.
  • No rows appear after filtering. Your condition may be too strict, or the column contains leading/trailing spaces. Try Contains instead of Equals, or use Trim in a custom column before filtering.
  • The filter step shows an error. Click the step and read the message in the formula bar. Common causes: wrong data type, a column renamed upstream, or a syntax error in a custom filter. Fix the type or formula and reapply.
  • Filtered data does not refresh. Check the query's source settings and credentials. In Excel, use Data > Refresh All. In Power BI, use Home > Refresh.
  • You filtered the wrong query. Power Query groups queries in the left pane. Select the correct query before editing steps.

Frequently Asked Questions

Can I filter by multiple values in one column?

Yes. In the filter menu, tick the checkboxes for each value you want to keep, then click OK. For many values, use a custom filter with an Or condition or a list.

How do I remove a filter?

Click the X next to the "Filtered Rows" step in the Applied Steps list, or click the filter arrow and choose Clear Filter. This removes the filter and restores the rows.

Does filtering in Power Query affect the original data?

No. Power Query filters only the query output. The source table or file remains unchanged.

Can I filter by a date range?

Yes. Use Date Filters > Between and enter the start and end dates. For dynamic ranges, use a custom filter with Date.From and DateTime.LocalNow.

Why do some rows still appear after I filter them out?

Check for trailing spaces, different casing, or hidden characters. Use Text.Trim and Text.Lower in a custom column before filtering, or switch to a Contains condition.

Is filtering the same as removing rows?

Filtering hides rows from the output but keeps the step reversible. Removing rows deletes them permanently from the query. Filtering is safer for exploratory work.