How to Remove Null from Filter in Tableau
Seeing "Null" pop up in your Tableau filter can be frustrating, especially when you're trying to build a clean and professional-looking dashboard. It often means data is missing or a join didn't match up perfectly, and it can confuse anyone trying to understand your visualization. This guide will walk you through several effective methods to remove these null values from your filters, from quick fixes to more robust, workbook-wide solutions.
What Are Null Values and Why Do They Appear?
Before jumping into solutions, let's quickly understand what "Null" signifies in data analysis. A null value simply means the data is missing or unknown for that particular record. It doesn't mean zero or a blank space, it represents the complete absence of a value.
In Tableau, nulls often appear in your filters and visualizations for a few common reasons:
Incomplete Source Data: Your underlying data source (like an Excel file or Google Sheet) might have empty cells. When Tableau imports this data, it interprets those empty cells as nulls.
Data Joins: This is one of the most frequent culprits. If you're using a left or right join to combine two tables, and a record in one table doesn’t have a corresponding match in the other, Tableau will fill the missing fields with null values. For example, if you have a Sales table and you left join it to a Customer Returns table, any sale that was not returned will have null values for the return date and reason.
Data Blends: Similar to joins, when blending data from different sources, null values can appear if a record in your primary data source doesn't have a matching record in the secondary source.
Regardless of why they appear, leaving them in your filters can make your dashboards look unfinished and can be confusing for end-users. Now, let’s look at how to get rid of them.
Method 1: Directly Exclude "Null" from the Filter Card
This is the quickest and most straightforward way to hide null values. It's a perfect solution when you're working on a single worksheet and just need to get the null option out of sight.
When to Use This Method
Use this for ad-hoc analysis or quick fixes on a single view. If you only need to remove the null value for one chart, this is the most efficient approach.
Step-by-Step Instructions:
Drag the field containing the null values (e.g., "Region," "Product Category") onto the Filters shelf.
A dialog box will appear showing all the members in that field. You will see a list of values, and "Null" will likely be one of them.
Simply uncheck the box next to Null.
Click OK.
Alternatively, if you already have the filter showing on a dashboard or worksheet:
Find the filter card on your view.
In the list of filter options, simply uncheck "Null".
If you don’t want users to ever see this option, you can right-click the "Null" value directly in the filter card and select "Exclude". This removes it from the list entirely and cleans up the view.
While this is fast, the downside is that it's a manual fix that only applies to that specific worksheet. If you use the same field in another worksheet, you'll have to repeat the process.
Method 2: Create a Calculated Field to Handle Nulls
For a more flexible and descriptive solution, you can create a calculated field. This method doesn't just hide nulls, it allows you to replace them with a more user-friendly label like "Unknown," "Not Assigned," or "N/A." This transforms confusing missing data into a clear, understandable category for your audience.
When to Use This Method
This is ideal when you need to provide context for the missing data rather than just hiding it. It's also reusable across multiple worksheets in your workbook, creating more consistency.
Step-by-Step Instructions:
We'll use the powerful IFNULL() function for this. It checks if a field is null and, if so, replaces it with a value you specify.
In the Data pane on the left, right-click on the dimension that contains nulls and select Create > Calculated Field.
Give your new field an intuitive name, like "Product Category (Cleaned)".
In the formula editor, enter the following formula (replace
[Product Category]with your field name and "Uncategorized" with your desired text):
This formula tells Tableau: "Look at the [Product Category] field. If you find a null value, show 'Uncategorized'. Otherwise, show the original value."
Click OK. You'll see your new calculated field appear in the Data pane.
Now, use this new "Product Category (Cleaned)" field in your filter instead of the original one. Drag it to the Filters shelf. You'll see that "Uncategorized" is now an option instead of "Null." You can choose to include or exclude it, but you've eliminated the confusing null label.
An alternative function is ISNULL(), which returns TRUE or FALSE. This is useful for building boolean filters or more complex logic, like this:
This approach gives you complete control over how missing data is presented, which is a major step toward building more professional and user-friendly dashboards.
Method 3: Apply a Data Source Filter
What if you want to exclude null values from a field across your entire Tableau workbook? Applying the filter on every single sheet is tedious and prone to error. The solution is a Data Source filter, which removes the data before it even reaches your worksheets.
When to Use This Method
Use a Data Source filter when you know with certainty that you will never need to analyze the null values for a given field in your entire project. It's the most efficient way to exclude data globally, and it can also improve a workbook's performance, as Tableau has less data to process.
Step-by-Step Instructions:
Navigate to the Data Source tab, located at the bottom-left of your Tableau window.
In the top-right corner of the Data Source page, you'll see a section titled "Filters." Click the "Add" button here.
Another dialog box, "Edit Data Source Filters," will appear. Click "Add..." again inside this box.
From the list of fields, select the column that contains the null values you want to permanently exclude. Click OK.
A new filter configuration window will open for that field. You can use one of two ways to remove the null values here:
The Simple Way (General Tab): Just like a regular filter, you'll see a list of members. Deselect Null from the list and make sure all other values are checked.
The Robust Way (Condition Tab): For a more foolproof method, select the Condition tab, choose By formula, and type in the following condition:
This tells Tableau to only keep rows where your field is NOT null. This is generally a better approach because it will work even if new values are added to the field later on.
Click OK to apply the filter.
Now, any new worksheet you create using this data source will automatically have those nulls filtered out. You won't have to think about it again.
Best Practices for Handling Nulls in Tableau
Getting rid of nulls can clean up your visuals, but it's just one piece of the puzzle. Applying some thought to how and why you handle them will improve your data analysis across the board.
Understand Why the Nulls Exist
Before excluding anything, take a moment to investigate the source. Is the data truly missing, or is it the result of an incorrect join? A LEFT JOIN might be creating nulls because there was no match, whereas an INNER JOIN would have excluded that entire row. The best solution might be to fix your data relationships rather than just hiding a symptom in a filter.
Prioritize Clarity Over Hiding Data
The easiest option is to exclude nulls, but it's not always the best one. Ask yourself what the null represents. Does a null status mean "Not Shipped"? Or "Customer Inactive"? Using a calculated field to rename a null value with a clear, descriptive label is almost always better for your audience than making data disappear without explanation.
Clean Data at the Source If Possible
The ultimate best practice is to handle missing data before it even gets into Tableau. If you have control over the source database, spreadsheet, or ETL (Extract, Transform, Load) process, cleaning and standardizing your data there is the most robust and scalable solution.
Final Thoughts
Handling null values is a fundamental skill in Tableau that separates good dashboards from great ones. You can use a direct filter exclusion for quick fixes, a calculated field for more descriptive labels, or a data source filter for a powerful, workbook-wide solution. Picking the right method depends on whether you want to hide, re-label, or permanently remove the data from your analysis.
So much of the time spent on reporting is wrapped up in data preparation - cleaning up fields, fixing joins, and dealing with issues like null values. At Graphed , we built our AI data analyst to handle this messy prep work for you. After you connect your marketing and sales platforms in a few clicks, you can just ask questions in plain English. Graphed automatically syncs, cleans, and structures the data, letting you build real-time dashboards instantly instead of getting stuck trying to figure out where nulls are coming from.