Why Isn't My Top Filter Working in Tableau?

By: Eric Parker

Pro Headshot.jpg

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.

The first thing to understand about “Top” filters in Tableau is where they fall in Tableau’s order of operations. Consider this image borrowed from Tableau’s website:

111-1.png

Notice that “top N” filters happen a half-step before dimension filters. Here’s what that means.

If you have a list of products and want to see the top 10 by Sales, you can use a top filter to accomplish that.

111-2.png

However, if you add another filter like Category = Technology, the visual may no longer show 10 products unless all 10 of the top-selling products were part of the Technology segment of the business.

111-3.png

That’s because the Product Name filter (Top N) is processed before the Category filter (Dimension).

If you’d like to see 10 products no matter which Category the worksheet is filtered on, you can add Dimension filters to “Context”.

111-4.png

Once the Dimension filter is converted into a Context filter the pill will turn gray and it will be processed before the Top N filter(s).

Context - Top 10.PNG

End users can interact with Context filters in the same way that they interact with dimension filters. Be aware that alternative types of filters like Tooltip filters (which occurs when you create a View in Tooltip)  and dashboard action filters can be added to context on worksheets as well.

Comparing Values to a Monthly Average (Across Several Years)

Efficient Filter Layout for Tableau Dashboards

0