Does Not Equal Sign in Power BI

Cody Schneider9 min read

When you're sorting through your business data in Power BI, sometimes what you don't want to see is as important as what you do. Filtering out irrelevant information - like internal 'test' sales or inactive customer accounts - is fundamental to getting a clear picture of your performance. This tutorial will show you exactly how to use the 'does not equal' sign (<>) in Power BI to exclude specific data and make your reports much more precise.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

What Exactly is the "Does Not Equal" Operator?

In Power BI's DAX language, the "does not equal" sign is represented by two angle brackets: <>.

Think of it as the opposite of the equals sign (=). While = checks if two values are the same, <> checks if they are different. It's a simple comparison operator that asks the question: "Is this value different from that value?" If the answer is yes, it returns TRUE. If the answer is no (meaning they are the same), it returns FALSE.

For example, a statement like "USA" <> "Canada" would be TRUE because the two text strings are different. A statement like 100 <> 100 would be FALSE because the numbers are identical.

This simple concept is incredibly powerful for filtering your reports and creating more intelligent calculations.

Why and When to Use "Does Not Equal"

So, when would you actually need to use this? This operator is your go-to tool for exclusion. It allows you to clean up your visuals and calculations by removing data points that would otherwise skew your results or add unnecessary noise. Here are a few common business scenarios where the <> operator is a lifesaver:

  • Filtering Out Specific Categories: Imagine you have a product sales chart, but you want to exclude a product category like "Discontinued Items" that isn't relevant to your current sales strategy. You can use <> to filter out that category.
  • Excluding Internal/Test Data: Most businesses have test transactions or internal employee accounts in their databases. If a marketing analyst wants to analyze real customer behavior, they must filter out any sales attributed to an internal email domain (e.g., sales made to emails ending in @yourcompany.com).
  • Ignoring Certain Statuses: In a sales or support funnel, you often deal with different statuses like "Open," "Won," "Lost," or "Cancelled." To calculate an accurate conversion rate, you might want to see the total number of leads that are not in the "Open" status yet.
  • Comparing Dimensions: You could create a flag in your data to see if a product's shipping country is different from its country of origin, helping to identify export sales.

Anytime you find yourself saying, "I need to see everything except...", the <> operator is likely the solution.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

How to Use "Not Equal To" in DAX Formulas

The "does not equal" operator really shines when you use it within DAX (Data Analysis Expressions), the formula language for Power BI. You can apply it in two primary ways: Calculated Columns and Measures.

1. Creating a Calculated Column

A calculated column adds a new column to one of your data tables. The value in each row of this new column is determined by a DAX formula. This is useful for creating predefined labels or categories you can use later in charts and slicers.

Example: Identifying Non-US Sales

Let's say you have a 'Sales' table with a 'Country' column, and you want to create a new column that explicitly labels sales as either "US Sales" or "International Sales."

Step-by-Step Instructions:

  1. Navigate to the Data View in Power BI (the grid icon on the left sidebar).
  2. Select the table you want to add the column to, in this case, our 'Sales' table.
  3. In the 'Table tools' tab that appears in the top ribbon, click on New column.
  4. The formula bar will appear at the top. This is where you'll type your DAX formula. Enter the following:

Sale Type = IF(Sales[Country] <> "USA", "International Sale", "US Sale")

Breaking Down the Formula:

  • Sale Type =: This is the name we're giving our new calculated column.
  • IF(...): This is a standard conditional function. It checks if a condition is true, then returns one value if it is, and another value if it's false.
  • Sales[Country] <> "USA": This is our core logic. For each row in the 'Sales' table, it checks if the value in the 'Country' column is not equal to "USA."
  • "International Sale": If the condition is TRUE (the country is not USA), our formula will put this text in the 'Sale Type' column for that row.
  • "US Sale": If the condition is FALSE (the country is USA), this text will be used instead.

After you press Enter, a new 'Sale Type' column will be added to your table. You can now use this column in a slicer or chart to easily filter your report by international versus domestic sales.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

2. Building a Measure

A measure is a calculation that's performed on the fly based on the context of your report (like filters applied by users). Measures don't sit in a physical column like calculated columns do, they produce a single, aggregated value. Measures are perfect for calculating things like total revenue, average order value, or counts.

Example: Calculating Revenue from All Products Except "Accessories"

Imagine your company sells 'Hardware,' 'Software,' and 'Accessories.' You want to create a KPI card showing the total sales revenue but only for 'Hardware' and 'Software'.

Step-by-Step Instructions:

  1. Make sure you're in the Report View in Power BI.
  2. In the top ribbon, under the 'Home' tab, click New measure.
  3. In the formula bar that appears, enter the following DAX formula:

Core Product Revenue = CALCULATE( SUM(Sales[Revenue]), FILTER( Products, Products[Category] <> "Accessories" ) )

Breaking Down the Formula:

  • Core Product Revenue =: The name for our new measure.
  • CALCULATE(...): This is one of the most important functions in DAX. It modifies the context of a calculation. Here, it's telling Power BI to perform a calculation with a special filter applied.
  • SUM(Sales[Revenue]): This is the expression we want to compute. We are summing up the values in the 'Revenue' column of our 'Sales' table.
  • FILTER(...): This function creates a new, temporary table based on a filtering condition. It's the filter argument for our CALCULATE function.
  • Products: We're telling FILTER to look at our 'Products' table.
  • Products[Category] <> "Accessories": This is our condition. FILTER will scan the 'Products' table and only include rows where the 'Category' column is not equal to "Accessories".

When you're done, this measure will now calculate the total revenue but completely ignore any sales linked to the "Accessories" product category, giving you a precise view of your core product performance.

Using "Does Not Equal" in Power Query Editor

You can also exclude data before it even gets into your data model by using the Power Query Editor. This is often the best practice for permanent, pre-report data cleaning.

Example: Removing Internal Users from a Leads Table

Let's say your 'Leads' table contains entries from colleagues whose email addresses end with "@yourcompany.com." These aren't real leads, so you want to remove them entirely.

Step-by-Step Instructions:

  1. From the 'Home' tab in Power BI, click Transform data. This opens the Power Query Editor.
  2. Select your 'Leads' query from the left pane.
  3. Find the 'Email' column. Click the filter dropdown arrow (▼) at the top of the column.
  4. Go to Text Filters > Does Not End With....
  5. In the dialog that appears, type @yourcompany.com and click OK.

That's it! Power Query will add a new "Filtered Rows" step that permanently excludes any rows with emails ending in your company's domain. The underlying M code for this step, viewable in the advanced editor, will use the <> operator to achieve this.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Common Mistakes and Best Practices

Using <> is straightforward, but there are a few things to keep in mind to avoid common pitfalls.

  • Case Sensitivity: DAX is generally case-insensitive with text. This means Sales[Country] <> "usa" and Sales[Country] <> "USA" will produce the same result (a FALSE if the country is "USA"). Be aware of this if your data has meaningful case distinctions. Power Query, on the other hand, can be case-sensitive.
  • Handling Blanks: The <> operator treats BLANK() values in a special way. BLANK() <> "USA" will return TRUE, but BLANK() <> 0 returns FALSE because blanks are treated like zero when compared with a number. If you need robust blank handling, it's better to explicitly check for it with ISBLANK().
  • Multiple "Not Equal To" Conditions: If you need to exclude multiple items, chaining together several AND clauses with <> can get messy. For example: [Category] <> "A" AND [Category] <> "B" AND [Category] <> "C". A much cleaner approach is to use the NOT function combined with the IN operator:

NOT ( Products[Category] IN { "Accessories", "Shipping Supplies" } )

This single line does the same thing: it checks if the category is anything other than "Accessories" or "Shipping Supplies." It's easier to read and maintain.

Final Thoughts

Filtering your data to exclude specific items is a foundational skill in Power BI, and the "does not equal" operator (<>) is your primary tool for the job. Whether you use it in DAX to create dynamic calculated columns and measures or in Power Query to perform upfront data cleaning, mastering this simple operator lets you create reports that are cleaner, more accurate, and more relevant to your business questions.

Developing proficiency in DAX and Power Query is incredibly rewarding, but it does have a real learning curve. Sometimes you just need to answer a business question without spending half an hour writing and debugging formulas. We built Graphed for exactly that reason. Instead of manually writing DAX, you can simply ask, "Show me my total revenue from all product categories except accessories" in plain English, and have a dashboard built for you instantly. It lets you focus on the insights gathering, not the formula writing.

Related Articles