If a Power Query filter is not working, first check the filter step in the Power Query Editor, confirm the column’s data type and actual values, then refresh the query. A filter can appear wrong when it is applied to an earlier version of the data, when values contain spaces or errors, or when you are looking at an Excel worksheet filter rather than the query’s filter.
How Power Query filters work
Power Query records data-cleaning actions as steps. A filter is one of those steps: it keeps rows matching a condition and excludes the others from the query result. In the editor, the filter usually appears in the Applied Steps list as a step such as Filtered Rows. Selecting the step lets you see the data at that point in the sequence.
In Excel for Microsoft 365 on Windows, open an existing query from Data > Queries & Connections, then double-click its name to open the Power Query Editor. You can also use the query’s context menu to choose Edit. A filter created from a column’s dropdown is different from the dropdown filter on a loaded Excel table: the former changes the query’s output, while the latter only hides rows in the worksheet view.
Power Query filters are also different from filters on the source data. Filtering a source worksheet or database table does not necessarily tell a query to import only the visible rows. To restrict the query, add a filter in Power Query itself or change the source/query logic appropriately.
Check the filter step and its position
Start by opening the query and inspecting Applied Steps in the Query Settings pane. Click the filter step to see which rows remain at that stage. If the expected records are already missing before that step, an earlier action—such as removing rows, changing a type, or filtering another column—is responsible. If the rows are present before the filter and disappear afterward, inspect the filter’s selected values and condition.
Steps run in order. For example, a filter that keeps dates after January 1 will behave differently if an earlier step has converted the date column incorrectly. A filter can also refer to a column name that was renamed or transformed in a previous step. Select the step, use its gear icon when available to edit its settings, or remove it with the X beside the step and recreate it if necessary. Removing a step can affect later steps, so review the preview after each change.
- Check whether the filter is on the intended column and whether the selected values or comparison operator are correct.
- Look for earlier steps that remove rows, replace values, split columns, or change column names.
- Check later steps too: a second filter or a row-removal step may undo the result you expect.
Verify the column’s data type
A frequent cause is a mismatch between what a value looks like and what Power Query has stored. A column containing numbers may actually be text. For example, the text value “100” is not necessarily treated like the number 100 in every operation. Similarly, a date-looking string may still be text, so date filters may not sort or compare it as intended.
Check the type icon beside the column name in the editor, such as ABC for text, 123 for a whole number, or a calendar for a date. Use the Data Type control on the Transform or Home tab to set the appropriate type. If conversion fails or interprets values incorrectly, select the column and choose Change Type > Using Locale. This is useful for dates such as 03/04/2025, which can mean different days depending on the locale, and for numbers whose decimal or thousands separators vary.
Do not change a column to a number just to make a filter work if it contains meaningful nonnumeric codes, leading zeroes, or mixed values. A product code such as 00127 may need to remain text; converting it to a number removes the leading zero. Choose a type that matches how the data should be interpreted, then apply the filter again and check for conversion errors.
Look for spaces, spelling differences, and nulls
Values that look identical on screen may differ. A text field can contain a leading or trailing space, a nonbreaking space copied from a web page, different punctuation, or a spelling variation. Filtering for “West” will not necessarily match “West ” with a trailing space. In the editor, inspect the values closely or use Transform > Format > Trim to remove ordinary leading and trailing spaces. Clean can remove certain nonprinting characters, but it does not resolve every kind of unusual whitespace.
Case can matter when a condition is evaluated in the M language. An exact comparison in a custom expression may distinguish “Open” from “open”; the behavior of a filter interface or source system can also depend on how the query is generated and where it runs. If capitalization varies, standardize the text first—for example, by transforming it to uppercase or lowercase—and then filter consistently. Avoid assuming that two strings are identical just because the preview uses similar lettering.
Null, an empty text value, and a string containing spaces are different cases. A null represents a missing value; an empty string has zero text characters; a space is still a character. In a column filter, check the blank or null choices separately, and decide whether the intended rule is to keep missing values, remove them, or treat them as empty text. Also inspect error values: a comparison applied to an error can produce an error rather than a normal included or excluded row.
Check dates, times, and numeric conditions
For a date filter, confirm that the column is a Date or Date/Time type, not text, and check whether the values include times. A Date/Time value on the same calendar day can fall outside a boundary if the condition compares it with midnight and the time is later in the day. If the requirement is “all records on March 5,” use a date-only column or a condition that includes the entire intended date range.
For numeric filters, check whether the rule is greater than, greater than or equal to, or between. A condition of greater than 10 excludes 10; greater than or equal to 10 includes it. Confirm that decimal values and negative numbers are represented as expected and that the column has not been imported as text. These small distinctions commonly explain why one boundary row seems to have vanished.
When filtering times or timestamps from systems in different time zones, check whether the source stores local time, UTC, or values with an explicit offset. A converted timestamp may display on a different calendar date from the source’s local date. Verify the underlying value and conversion steps before changing the filter boundary.
Refresh the query and distinguish preview from output
The editor preview is not the same thing as a refreshed worksheet result. After changing a query, select Home > Close & Load to apply the change to the workbook. To update data from its source later, use Data > Refresh All, or right-click the query result and choose Refresh. If a query is set to refresh on a schedule or has connection settings that delay refresh, the displayed table may not reflect the latest source data.
Also check what the query loads. In Queries & Connections, inspect whether it loads to a worksheet table or is connection-only, and whether you are viewing the correct output. A worksheet table may retain its own sort or filter state, which can make its visible rows differ from the full query result. Clear the table’s worksheet filter to see whether records are present but hidden. That does not alter the Power Query steps.
If the source changes but the query output does not, confirm the source path, file, table, or database object in the Source step. A query can be filtering correctly while reading a different file or a stale copy. Refresh errors or permission prompts can also prevent new source data from appearing, so check the status and error message rather than judging only by the visible rows.
Understand source behavior and query folding
For some sources, Power Query can translate steps into a request that runs at the source; this is called query folding. For example, a filter may be sent to a database rather than applied only after importing rows. Folding can improve efficiency, especially with large tables, but differences in source-system collation, data types, or date handling can affect how comparisons behave. If a result differs from what you expect, compare the source values and the Power Query preview, and review the filter step’s logic.
Not every connector or transformation supports folding, and the presence or absence of folding does not by itself prove that a filter is wrong. A filter that cannot fold can still work after Power Query imports the data, though it may take longer. For a database query, check whether the source already restricts rows and whether later transformations change the values used by the filter. If performance is the problem rather than the result, reducing the data earlier at the source may help, when it is safe and appropriate to do so.
A practical troubleshooting order
Use this sequence to narrow the cause without rebuilding the whole query:
- Open the query in Power Query Editor and select the Filtered Rows step.
- Check the preview immediately before and after that step to locate where the rows disappear.
- Verify the column name, data type, condition, and selected values.
- Inspect representative source values for spaces, spelling differences, nulls, errors, and date or number formatting.
- Review earlier and later steps for type changes, row removals, or additional filters.
- Close and load the query, refresh it, and clear any separate worksheet table filter before checking the final output.
If the issue remains, test with a small, known set of rows that includes a matching value, a nonmatching value, a blank, and a boundary value. This makes it easier to tell whether the problem is the condition, the source data, or a later step. Keep a copy of the original query or workbook before making major changes, particularly when many downstream queries depend on it.
Frequently Asked Questions
Why does Power Query keep showing rows I filtered out?
Check whether you are viewing a stale worksheet result, a different query output, or the result before the intended filter step. Refresh after using Home > Close & Load, and review later steps for changes that reintroduce or retain rows.
Why does a filter miss values that look the same?
The values may differ by spaces, hidden characters, capitalization, punctuation, or data type. Inspect the underlying values, use Trim for ordinary surrounding spaces, and standardize the field before filtering if variations are expected.
Why does my date filter return the wrong day?
The column may be text, parsed using the wrong locale, or stored as Date/Time with a time component or time-zone conversion. Confirm the type and inspect the full value before adjusting the date condition.
Does filtering a worksheet table change the Power Query query?
No. A filter on the loaded Excel table changes which rows are visible in the worksheet; it does not edit the query’s transformation steps. Edit the query in Power Query Editor to change the imported result.
Why does a filter work in preview but not in Excel?
The worksheet may not have been updated, the query may have failed to refresh, or a separate worksheet filter may be hiding rows. Close and load, refresh, check for errors, and clear the table filter to compare the full output.
Does Power Query treat blank and null as the same?
No. Null means a missing value, while an empty string and a string containing spaces are text values. Check each case in the filter and decide explicitly which ones the query should keep.
Related
- Excel Data Validation List from a Table: How to Set It Up
- Data Validation in Word: Build Forms and Drop-Down Lists
- Data Validation List Based on Another List in Excel
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Errors & fixes
- Excel #REF! Error: Causes and How to Fix ItThe #REF! error in an Excel formula means that the formula contains an invalid cell reference. Find the…
- Excel Error Types: What Each One MeansExcel error types are messages that explain why a formula cannot return its intended result. Common examples include…
- Excel #DIV/0! Error: Causes and FixesExcel’s #DIV/0! error means a formula is trying to divide by zero or by a blank cell. If…
- Excel Error 0xc0000142: Causes, Fixes, and Next StepsExcel error 0xc0000142 means Windows could not initialize a component Excel needs while starting the program. Close and…
- COUNTA Formula Not Working? Fix Common Excel IssuesCOUNTA often seems not to work because it counts cells containing formulas that return an empty string, spaces,…
- Excel #VALUE! Error: Find and Fix the Common CausesTo eliminate Excel’s #VALUE! error, check the cells used by the formula, correct any text or spaces where…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.