How to Create Parameter for Top N Items?


In a business scenario, measuring performance of various products is an important and regular activity. How to find the Top 10 Products? Or how to find the Top N Items for any particular category? It is a key metric to identify how a business is performing. The leadership can assess and plan accordingly to make key decisions based on what the analytics show.

woman pointing black pen on white paper with graph
Tableau Parameters to Find Top N Items

Steps to Create Tableau Parameter for Top N

Let’s say we have a table with the dimension Product Name and the corresponding total Sales for each Product. We want to see the Top N Products by Sales using a Parameter. We want to be able to interact with the parameter and decide the value of N at our convenience. How can we achieve this in Tableau? How can we create such a Tableau Parameter that can allow us to interact with it and provide a flexible value of Top N items?

Tableau Parameter to find Top N Items

As we see here, first Drag the dimension which we want to find the Top N for and place it in Filters. Then go to the ’Top’ tab, and under ’By field’, select ‘Create a New Parameter’. Give the Parameter a name. Mention how many Top items you want to view, i.e. Top 5 or Top 10 etc. On the left pane in Parameters, right click on the Parameter and choose ’Show Parameter’. Now you can interactively choose using a Parameter how many Top N items you want in your analysis.

Why Create a Tableau Top N Parameter

A Tableau Parameter is very helpful in adding interactivity to a report or dashboard. It helps to analyze the data with the flexibility to find any number of Top N items. Example the Top 5 Products by Sales, or the Top 10 Products by Profit, or the Top 10 States by highest Products sold, or the Top 2 students with highest average marks who qualified for a scholarship. Using a Tableau Parameter, thus we can add powerful features to our Tableau analysis and achieve greater insights from our data.

Get our Most Popular Downloads

Tableau Practice Test

The best Tableau practice exams built. Period. Explore definitive practical problems created by brilliant Tableau experts.

Get in Touch

Contact Us

Published by Rahul

Comfortably confused :)

Leave a Reply