How can I use the “Not Equal” operator in Power BI?

The “Not Equal” operator in Power BI is a logical operator that allows users to compare two values and determine if they are not equal. This operator is typically used in conjunction with other operators, such as the “Equals” operator, to create more complex expressions for data analysis and filtering. To use the “Not Equal” operator in Power BI, users can simply add it into their expression or use it as a filter condition. This can help users easily identify and analyze data that does not match a specific value or condition, allowing for more accurate and efficient data analysis. Additionally, the “Not Equal” operator can be used in various data visualizations, such as charts and tables, to highlight differences between data points. Overall, the “Not Equal” operator is a useful tool for data analysis and can greatly enhance the functionality of Power BI for users.

Power BI: Use “Not Equal” Operator


You can use <> as the “not equal” operator in DAX.

There are two common ways to use this operator in practice:

 Method 1: Use <> to Create New Column

Team Classification =
IF('my_data'[Team] <> "B", "Not on Team B", "On Team B")

Method 2: Use <> to Create New Table

filtered_data =
CALCULATETABLE('my_data', 'my_data'[Team] <> "B")

The following examples show how to use each of these methods in practice with the following table named my_data in Power BI that contains information about various basketball players:

Example 1: Use <> to Create New Column

Suppose we would like to create a new column that contains one of the following strings:

  • “Not on Team B” if the value in the Team column is not equal to “B”
  • “On Team B” if the value in the Team column is equal to “B”

To do so, click the Table tools tab and then click the New column icon:

Then type the following formula into the formula bar:

Team Classification =
IF('my_data'[Team] <> "B", "Not on Team B", "On Team B")

This will create a new column named Team Classification that returns one of the two strings that we specified:

Example 2: Use <> to Create New Table

Suppose we would like to create a new table that only contains the rows from the my_data table where the value in the Team column is not equal to B.

To do so, click the Table tools tab and then click the New table icon:

Then type the following formula into the formula bar:

filtered_data =
CALCULATETABLE('my_data', 'my_data'[Team] <> "B")

This will create a new table named filtered table that only contains the rows from the my_data table where the value in the Team column is not equal to B:

Note: You can find a complete list of operators you can use in DAX .

Additional Resources

The following tutorials explain how to perform other common tasks in Power BI:

x