By: Eric Parker
Eric lives in Seattle and has been teaching Tableau and Alteryx for 5 years. He's helped thousands of students solve their most pressing problems. If you have a question, feel free to reach out to him directly via email.
Have you ever had an experience in Tableau where you set a filter but don’t get the results you expected? There are multiple reasons that can happen. One of them is that you can set multiple filter criteria in a single pill on the Filters Card.
Let’s look at an example.
In this chart we’ve got sales by product for 1,850 products (note the value in the status bar).
Now, I’ll add a filter to keep only the top 10 products by sales.
We’d expect to see just 10 products remaining, but this is what happens instead:
What gives?
If we return to the filter, we’ll find that not only is it filtered to the top 10 but is also applying a conditional filter to only keep values where Sales = 0.
This can happen by accident if you are flipping through the different tabs in the filter dialogue and leave one selected when you move on to another.
How do all those tabs work? They are applied in order. Let’s explore.
Starting from scratch, if we apply a wildcard filter to keep only products that have the word “printer” these are the results:
The 1,850 original products are now cut down to just 43.
Next, if we flip over to the Condition tab and keep only those products where sales is greater than $3,000, there are only 15 printers that meet that criteria.
Finally, if we apply a top criteria to only keep the top 10 selling printers, the result set contains 10 products:
Note; the result set could show less than 10 products if there weren’t 10 printers that crossed the $3,000 threshold (because of the previous criteria we set).
Hopefully you now have a better feel for how setting filtering criteria in Tableau works!
Want help with your own Tableau questions? Sign up for an office hour and we’ll help you!