How to Filter Rows in Power BI Query Editor

Cody Schneider••8 min read

One of the first steps toward an insightful dashboard is cleaning up your data, and filtering rows is a foundational part of that process. By trimming your dataset to only include relevant information in Power BI's Power Query Editor, you can improve report performance and make your analysis much clearer. This guide will walk you through several easy and powerful ways to filter your data directly in the Query Editor.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

Why Filtering in Power Query Matters

Before jumping into the "how," it's helpful to understand the "why." Filtering data isn't just about hiding a few rows you don't need. It's a critical step in the data preparation phase (ETL - Extract, Transform, Load) that has several key benefits:

  • Improved Performance: Smaller datasets load faster. When you filter out unnecessary rows at the query stage, you're telling Power BI not to even load them into your data model. This reduces the model's size, which means faster report calculations and a more responsive user experience.
  • Increased Accuracy: Data is rarely perfect. Your source might contain null values, errors from data entry, or placeholder rows that don't belong in your analysis. Filtering these out ensures your calculations (like sums or averages) are accurate.
  • Focused Analysis: Sometimes, a report only needs to answer a question about a specific region, product line, or time frame. By filtering the data at the source, you can build a report focused exclusively on the information that matters, making it easier for users to understand.

In short, filtering at the query stage is like prepping your ingredients before you start cooking - it makes the final result much better.

Entering the Power Query Editor

First things first, you need to get into the Power Query Editor. This is your workshop for shaping and cleaning data before it hits your Power BI report.

From the main Power BI Desktop window:

  1. Navigate to the Home tab on the top ribbon.
  2. Click the Transform data button. This will open the Power Query Editor in a new window.

Here, you'll see your data tables listed on the left, and a preview of the selected table in the center. Now you're ready to start filtering.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

Method 1: The Basic Column Header Filter

The quickest way to filter rows is by using the drop-down menu on any column header. This is perfect for when you want to include or exclude specific values you can see in the data.

Let's say you have a "Country" column and you only want to see data for sales in a few countries and not the USA, Canada, or the UK.

  1. Click the Drop-down Arrow: Find the column you want to filter (e.g., "Country") and click the small downward arrow on the right side of the header.
  2. View Data Values: A pop-up menu will appear, showing you a sorted list of all the unique values in that column. Power Query may only load a preview, so click "Load more" if you don't see all the values.
  3. Select Your Values:
  4. Click OK: Once you've made your selections, click the OK button. The data preview will refresh, showing only the rows that match your filter criteria.

Notice that Power Query recorded this action in the Applied Steps panel on the right. You can click the 'X' next to the "Filtered Rows" step to undo it at any time.

Method 2: Condition-Based Filtering (Text, Numbers, and Dates)

Often, you don't want to filter by a specific list of values. Instead, you want to filter based on a rule or condition, like "show all products that contain the word 'Deluxe'" or "show all sales greater than $500." Power Query has specialized filters for different data types to handle this.

Filtering Text Data

Text filters are perfect for finding records that match certain patterns. In any text column's drop-down menu, hover over Text Filters to see your options:

  • Equals / Does Not Equal: For exact matches or exclusions.
  • Begins With / Does Not Begin With: Useful for filtering by prefixes, like an order number that starts with "ORD-".
  • Ends With / Does Not End With: Great for isolating data based on a suffix.
  • Contains / Does Not Contain: This is one of the most flexible options. Use it to find a keyword anywhere in the text. For example, filtering a "Product Name" column where the text contains "Bike."
  • Is Empty / Is Not Empty: Lets you quickly find or remove rows where the cell is completely empty.

Example: Filtering with "Contains"

  1. Click the drop-down on your "Product Name" column.
  2. Hover over Text Filters and select Contains.
  3. In the "Filter Rows" dialog box that appears, enter the word "Deluxe" into the text box.
  4. Click OK. Power BI will now only show rows where the product name includes the word "Deluxe."
GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

Filtering Number Data

Numerical data has its own set of logical operators. In any number column's drop-down menu, hover over Number Filters to apply conditions:

  • Equals / Does Not Equal: For a specific number.
  • Greater Than / Greater Than Or Equal To: For setting a lower limit.
  • Less Than / Less Than Or Equal To: For setting an upper limit.
  • Between: This allows you to set both a lower and upper bound (e.g., show sales between $100 and $500).
  • Is Even/Odd/Positive/Not Negative: Displays options for filtering number data.

Example: Filtering for Sales Above a Threshold

  1. Click the drop-down on your "Sales Amount" column.
  2. Hover over Number Filters and select Greater Than.
  3. In the dialog box, enter 1000.
  4. Click OK. The table will now only display sales transactions that were over $1,000.

Filtering Date Data

Date filters are incredibly powerful, especially the relative date options that keep your reports current automatically.

From the drop-down on a date or datetime column, hover over Date/Time Filters. You'll see standard options like Equals, Before, and After, but the real magic is in the relative options:

  • In the Previous... / In the Next... / In This...: These let you create dynamic filters without hardcoding dates. You can select options like:

Using a relative date filter like "In This Month" means that when October rolls around, the report will automatically filter for October data - no manual updates required.

Method 3: Combining Filters with Advanced Mode

What if you need to filter based on multiple conditions? For example, "show all sales from the USA OR Canada" or "show sales from the USA AND where the sale amount was over $500."

This is where the advanced filter dialog comes into play.

  1. Open the filter pop-up for any column (e.g., "Country"). Select Text Filters > Equals.
  2. A "Filter Rows" dialog opens. Notice the Basic and Advanced radio buttons at the top. Click Advanced.
  3. Now you can build multiple clauses. For the first clause, select "Country" equals "USA".
  4. You can now choose between And (both conditions must be true) or Or (either condition can be true).
  5. Let's select And. Add a second clause for "Sales Amount" is greater than "500".
  6. Click OK. Power Query will apply both filters simultaneously.

You can add several clauses here, giving you very fine-grained control over which rows to keep.

Method 4: Removing Blank Rows and Errors

A common data cleaning task is getting rid of junk data. This includes rows that are completely empty or cells that contain errors (often displayed as [Error] in Power Query).

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

Filtering Out Nulls and Errors

The easiest way to do this for a specific column is through the basic column header filter.

  1. Click the drop-down arrow on the column you want to clean.
  2. In the value list, simply uncheck the boxes for (null) and (error). This will quickly remove any rows with those unwanted values for that specific column.

Using the Ribbon to Remove Rows

Another approach is using the features in the top ribbon.

  1. Select the Home tab in the Power Query Editor.
  2. Find the Reduce Rows group.
  3. Click on Remove Rows. You'll see several options:

Final Thoughts

Filtering rows in the Power Query Editor is your first line of defense in creating clean, efficient, and focused reports. By leveraging basic check-box filters, condition-based rules for text, number, and date data, and even tackling nulls and errors, you can transform a messy dataset into a precise foundation for analysis.

Getting comfortable with these transformation tools is a huge step in moving beyond simple CSV uploads. For those who want powerful analytics without a deep dive into complex BI tools, we built Graphed to simplify this process entirely. You can connect your data sources directly and then use conversational prompts in plain English - like "show me all sales from Facebook ads in the US last quarter that drove more than $1,000 in revenue" - and watch as Graphed builds the charts and interactive dashboards you need, live. We handle the data models in the background, making it fast and easy to remove the noise and jump straight to the insights.

Related Articles