How to Get Top 10 Records in Tableau

Cody Schneider••7 min read

Showing the top 10 best-performing items in your dataset is one of the quickest ways to find meaningful insights. Whether you want to see your most popular products, top sales reps, or best-performing ad campaigns, filtering for the "Top 10" helps you immediately focus on what’s working. This article will show you three clear, practical methods to get the top 10 records in Tableau, from a simple drag-and-drop filter to a more advanced and dynamic approach.

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

Why Isolate the Top 10?

Before jumping into the “how,” it’s helpful to understand the “why.” The concept often traces back to the Pareto Principle, also known as the 80/20 rule. In many businesses, a small number of inputs produce the majority of outputs. For example:

  • Roughly 20% of your products might account for 80% of your sales revenue.
  • A small group of your most loyal customers could be responsible for most of your repeat business.
  • A few high-performing marketing channels often drive the bulk of your website traffic and conversions.

By filtering your data down to the top 5, 10, or 20 records, you can quickly identify these high-impact players. This allows you to focus your energy where it matters most - promoting bestselling products, nurturing your best customers, or doubling down on profitable marketing channels.

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.

Method 1: Using a Basic Top N Filter

This is the quickest and most straightforward way to show your top 10 records in Tableau. It’s perfect for fast analysis when you don't need the filter to be interactive for your end-users.

Let's use the classic Tableau Superstore dataset as an example. Our goal is to find the top 10 best-selling products.

Step-by-Step Instructions:

  1. Set Up Your View: First, create a basic bar chart. Drag the Product Name dimension from the Data pane onto the Rows shelf. Then, drag the Sales measure onto the Columns shelf. You'll see a long list of products and their sales. For clarity, click the sort button in the toolbar to arrange them in descending order.
  2. Drag the Dimension to the Filters Card: Hold down the CTRL key and drag a copy of Product Name into the Filters card. This keeps everything organized and allows you to apply a quick filter effectively.
  3. Configure the Top N Filter: A "Filter" dialog box will appear. You'll see several tabs at the top (General, Wildcard, Condition, Top). Click on the Top tab.
  4. Define Your Filter Logic:
  5. Apply the Filter: Click OK.

Your bar chart will immediately update to show only the 10 products with the highest total sales. This method is incredibly fast and intuitive, making it a favorite for many analysts performing routine checks.

Method 2: Using the INDEX() Function for Ranks

Sometimes you need more control, especially when working with more complex visualizations or wanting to show the rank number itself (1, 2, 3, etc.) next to each record. For this, a table calculation like INDEX() is a better tool. It calculates the position (index) of the current row in the view.

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

Step-by-Step Instructions:

  1. Set Up the Initial View: Once again, place Product Name on the Rows shelf and SUM(Sales) on the Columns shelf, then sort it descendingly.
  2. Create a Calculated Field:
  3. Add the Rank to Your View: Drag your new Rank field from the Measures pane onto the Rows shelf and place it to the left of Product Name. You’ll see that it's a green pill, meaning Tableau is treating it as a continuous measure.
  4. Convert Rank to Discrete: Right-click the Rank pill and select Discrete. The pill will turn blue, and you'll now see a rank number (1, 2, 3...) next to each product name.
  5. Filter by the Rank: Now, drag the blue Rank pill from the Rows shelf over to the Filters card. A "Filter Field" dialog box will appear. Enter a range from 1 to 10 and click OK.

Your view is now filtered to the Top 10 records, but this time you have a visible rank column. The benefit of this method comes from its interaction with Tableau's order of operations. Table calculation filters (like this one) are applied late in the pipeline, which gives you more control over the final result in complex vizzes.

Method 3: Creating a Dynamic Top N with a Parameter and Set

This is the most powerful and flexible method. It allows you or your audience to dynamically change the "N" value in "Top N" - for instance, switching from Top 10 to Top 5 or Top 20 on the fly right from the dashboard view.

This method involves two key Tableau features: Parameters (user-driven inputs) and Sets (custom subsets of your data).

Step 1: Create a Parameter

First, we need to create a control that lets the user input a number.

  1. In the Data pane, click the little dropdown arrow in the top right and select Create Parameter.
  2. Name your parameter. Let’s call it Top N Value.
  3. Set the Data type to Integer.
  4. For Current value, enter 10 as a default.
  5. Under Allowable values, you can select "All" or define a specific "Range" (e.g., from 1 to 50) to prevent users from entering invalid numbers.
  6. Click OK. You'll now see the Top N Value parameter at the bottom of the Data pane.

Step 2: Create a Set That Uses the Parameter

Next, we will create a Set of products, but instead of hardcoding "10", we'll link it to our new parameter.

  1. In the Data pane, find the dimension you want to rank. In our case, it's Product Name.
  2. Right-click on Product Name and select Create > Set.
  3. Name the set something descriptive, like Top Products by Sales Set.
  4. Just like in the first method, navigate to the Top tab and select By field.
  5. Now for the magic part: where it asks for the number of records (it defaults to 10), click the dropdown menu next to it. You will see your newly created parameter, Top N Value. Select it.
  6. Make sure the remaining fields are set correctly (By Sales, using the Sum aggregation).
  7. Click OK.

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.

Step 3: Use the Set as a Filter

  1. Create your worksheet as before (Product Name on Rows, SUM(Sales) on Columns).
  2. Find your new Top Products by Sales Set in the Sets section of the Data pane.
  3. Drag this set directly onto the Filters card.

That's it! Your view is now filtered. To make it interactive, right-click on the Top N Value parameter in the Data pane and select Show Parameter. A small control box will appear on your dashboard, allowing anyone to type in a number and watch the view instantly update to show the Top 5, Top 15, or whatever "N" they choose.

Which Method Should You Use?

Choosing the right method depends on your goal:

  • The Basic Top N Filter is perfect for quick, one-off analyses in a single worksheet where you don't need user interactivity. It's the fastest way to get an answer.
  • The INDEX() Function gives you more control over calculations and the ability to display the rank. It's best when the rank itself is an important piece of the story you're telling.
  • Sets and Parameters are the gold standard for creating user-friendly, interactive dashboards. If you're building a report for others to consume, this method empowers them to explore the data on their own terms.

Final Thoughts

Learning how to filter for your top records is a fundamental skill in Tableau that can unlock powerful insights quickly. Whether you opt for the simple drag-and-drop filter, a calculated rank, or a dynamic parameter, focusing on your top performers helps direct your attention and resources more effectively.

Building dashboards in BI tools often requires learning different methods, calculated fields, and configurations for what seems like a simple task. This is why we created Graphed. Instead of navigating menus to create sets and parameters, you can simply ask a question like, "Show me my top 10 products by revenue last quarter" and get an interactive chart in seconds. We automate the technical setup, allowing you to get answers and move on to the next big question without getting stuck on the process.

Related Articles