What Do Angle Brackets Mean in Tableau?

Cody Schneider••8 min read

If you've ever seen the <> symbols in a Tableau formula and wondered what you're looking at, you've found the "not equal to" operator. It's a fundamental tool for comparison that lets you exclude data, create conditional groups, and slice your analysis in powerful ways. This article will show you exactly what <> does and how to use it with practical, step-by-step examples.

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

Breaking Down the "Not Equal To" Operator

In Tableau, <> is a logical operator used to check if two values are different from each other. When you write a condition like [Region] <> 'West', you're asking Tableau to check every row in your data and determine if the value in the "Region" column is anything other than 'West'.

The result of this check is a boolean value: either True or False.

  • If the region is 'East', 'South', or 'North', the result is True.
  • If the region is 'West', the result is False.

This simple True/False output is the foundation for filtering data, creating new calculated fields, and building more sophisticated logic into your dashboards.

What about the != Operator?

You may have also seen != used for "not equal to," especially if you have a background in programming languages like Python or JavaScript. The good news is that in Tableau, <> and != are interchangeable - they do the exact same thing.

So which one should you use? It's really a matter of preference. The <> operator is more traditional in SQL (Structured Query Language), which forms the basis for how many databases work. Because Tableau often interacts with SQL databases, <> is more common to see in shared examples. Our advice? Pick one and stick with it for consistency in your workbooks.

How to Use <> in Calculated Fields

The most common and flexible way to use the "not equal to" operator is within a calculated field. This lets you create new dimensions or measures based on your logical conditions.

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.

Basic Calculation Example

Let's start with a simple scenario. Imagine you have sales data for a retail company and you want to flag any sale that did not use a coupon code. Your data has a field called [Coupon Applied], which contains either 'Yes' or 'No'.

Follow these steps to create your calculated field:

  1. Open a new or existing Tableau workbook.
  2. Right-click on any field in the Data pane on the left and select Create > Calculated Field.
  3. Name your new field something descriptive, like "Full Price Sale".
  4. In the formula box, type the following expression:

Let's break down what this does:

  • [Coupon Applied] refers to the field you're evaluating.
  • <> is the "not equal to" operator.
  • 'Yes' is the specific text value you are comparing against. Notice that text values (strings) must be enclosed in single or double quotes.

When you click "OK," Tableau will create a new field in your Data pane called "Full Price Sale". This field won't contain numbers or text, it will contain only True or False values. You can now drag this field into your view - for example, onto the "Color" marks card - to instantly highlight full-price sales versus discounted ones.

Practical Examples for Using the "Not Equal To" Operator

A simple True/False field is useful, but the real power comes from using <> as part of larger calculations or filtering strategies.

Use Case 1: Filtering Out Specific Data from Your View

Excluding data is one of the most common tasks in analysis. You might want to filter out test orders, internal user traffic, or irrelevant categories.

Let's say you want to see your sales performance for every product category except "Office Supplies".

Method 1: Direct Filter (The Easy Way)

  • Drag the [Category] dimension to the Filters shelf.
  • In the pop-up window, a list of all your categories will appear. Simply uncheck "Office Supplies."
  • Click the Exclude option on the right. This tells Tableau to include everything except your selection.

This is fast for simple cases. But what if you need to use this logic elsewhere? A calculated field is more reusable.

Method 2: Using a Calculated Field

  • Create a calculated field and name it "Is Not Office Supplies".
  • Enter the formula:
  • Drag this new "Is Not Office Supplies" field onto the Filters shelf.
  • A small dialogue box will appear asking which values to include. Check the box for True and click "OK".

Your view will now update to show all data where the category is not "Office Supplies." This method is more powerful because you can reuse the "Is Not Office Supplies" field in other worksheets or complex calculations.

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

Use Case 2: Creating Segments with IF/THEN Logic

The <> operator shines when combined with IF/THEN statements to segment your data. Let's say you want to classify your customers into two groups: those in your primary market (the United States) and those everywhere else.

  • Create a calculated field and name it "Customer Location".
  • Enter the following IF/THEN statement:

Here's how Tableau reads this formula:

  • IF [Country] <> 'United States': For each row, check if the value in the "Country" field is something other than 'United States'.
  • THEN 'International': If the condition is true (e.g., the country is Canada or Japan), assign the text value 'International' to this row.
  • ELSE 'Domestic': If the condition is false (meaning the country is 'United States'), assign the text value 'Domestic'.
  • END: Completes the statement.

You now have a clean custom dimension called "Customer Location" that you can use in any chart or table to compare the performance of your domestic and international markets.

Use Case 3: Working with Dates

You can also use <> to filter or group data based on dates. A common need is to analyze historical performance by excluding data from the current, unfinished year.

To do this, you can compare the year of each record's date with the current year using Tableau's built-in date functions.

  • Create a calculated field and name it "Is Previous Year".
  • Enter the formula:

Here’s the logic:

  • YEAR([Order Date]) extracts the year (e.g., 2022) from your "Order Date" field.
  • YEAR(TODAY()) returns the current year (e.g., 2024).
  • The formula compares the two, returning True for any order from a previous year and False for any order from this year.

Simply drag "Is Previous Year" to the Filters shelf, select True, and your visualization will instantly exclude any in-progress data from the current year.

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.

A Quick Warning: How <> Handles NULL Values

This is a critical concept that trips up even experienced analysts. A NULL value in a database represents a missing or unknown value. It's not the same as zero or an empty text string - it's a void.

Here's the key rule to remember: Any comparison to a NULL value, including a "not equal to" comparison, will result in Unknown (which Tableau treats as False in filters).

Let's revisit our "Customer Location" example. Imagine some of your customer records are missing a country. When your calculation [Country] <> 'United States' runs on a row where [Country] is NULL, the result isn't True. You might expect it to be, since NULL is definitely not 'United States', but it evaluates to False.

This means your 'International' group will incorrectly exclude customers with no country data.

The Solution: Account for NULLs Explicitly

To fix this, you need to tell Tableau how to handle NULLs before the comparison. The IFNULL() function is perfect for this. It checks a field, and if it's NULL, it substitutes a value you provide.

Let's update our [Customer Location] calculation:

IF IFNULL([Country], 'Unknown') <> 'United States'
THEN 'International'
ELSE 'Domestic'
END

Now, when Tableau finds a NULL [Country], it temporarily replaces it with the string 'Unknown'. Since 'Unknown' is not equal to 'United States', the condition correctly evaluates to True, and the record is placed in your 'International' group. It's a small change that ensures your data is categorized accurately.

Final Thoughts

The "not equal to" operator - whether you write it as <> or != - is a core part of the Tableau toolkit. It grants you precise control to exclude specific data points, filter out a single category from a large group, and create powerful custom segments with IF/THEN logic. Getting comfortable with this small but mighty operator moves you from simply visualizing data to actively shaping your analysis.

After helping countless users wrestle with operators, calculated fields, and NULL values, we knew there had to be an easier way to get answers from data. We built Graphed to remove this friction entirely. Instead of writing formulas to exclude data, you can just ask in plain English: "Show me a chart of sales by product, but exclude office supplies." Graphed connects to your data sources like Google Analytics, Shopify, and Salesforce and instantly creates the live, interactive dashboard you need - no syntax required.

Related Articles