top of page
• Antoneely Calizaya

# Tableau parameters – Top & bottom N

In today’s blog we’ll take a look at one of Tableau’s most famous features. In my Tableau Public, you will notice that I often use parameters. They are so versatile and allow you to provide the user with the interactivity they need.

But what exactly are parameters? How do they work? Hopefully you’re getting excited. You will get a full explanation of everything, some user cases, and a example that shows Top and Bottom N at the same time, with the user controlling N.

Some user cases examples

Walk trough exercise – Top and Bottom N Imagine you have a sample data set where you would like to show some insights about the products based on the volume of orders. It makes sense to show this in a bar chart, but you don’t know what information is best to include. The most popular products? But what about the less popular ones? Okay, so you’ve decided to make two charts and set up some filters to display the top and bottom N products. My guess is that you noticed that your charts are a bit off. That’s right, they’re statists! The user cannot interact with it or change the N number further. It would be great if you could create parameters for this. So, let’s begin, we’ll use the Superstore Data sample for this example. This is not news to you!

Let’s start by putting some nice music on. Perhaps you’d like something different, here is my Spotify playlist.

1. What do we do? In this opportunity, we want to identify the five most profitable products and the five least profitable products, and we want to be able to change these values. To do that, we’ll use parameters with combined sets. You can learn more about sets here.

2. Create the parameters First, make the TOP N, then duplicate it, and rename to Bottom N. It’s that easy!

3. Create the sets One more time, first make the TOP N set first, then duplicate it, and rename and select Bottom N instead.

4. Combine the sets We’ve got the two sets ready, now let’s combine them. Select both, and then right-click, then click on Create Combined Set.

5. Put all together Remember when you used individual filters to show top and bottom products? The combined set can also be used as a filter. So, let’s put everything together as follows.

All right, that’s all. Now you’re able to use parameters and sets. Thanks for checking it out! I hope you enjoy it. I look forward to seeing you soon. You can see my Tableau Public here. See you soon on my next blog, and if you’re looking for new tunes while learning new cool stuff or preparing for your Alteryx certification, check out my Spotify playlist here.