18 August 2023
Allowing users to filter views to show the top or bottom N values is a common requirement in Tableau. Using parameters makes this flexible for end users.
In this article, you'll learn how to create Top N parameters in Tableau Desktop to dynamically rank and filter data. This article is part of our on-going blog series of useful 'how-to' guide in Tableau. The material from JBI Trainings is part of our tableau courses which can be accessed remotely or in person in London. Simply follow the link to participate in the training for you or your team. Tableau Training London
Giving dashboard users the ability to specify the number of top/bottom rows they want to see is extremely valuable for analytics.
For example, your executives may want to:
By creating a Top N parameter, you can enable this flexible filtering without complex calculations.
We'll walk through how to set up ranking params using different Tableau techniques. Let's get started!
The easiest way is to base your parameter on the Top N Filter.
Steps:
Now users can change the parameter to rank top and bottom values dynamically.
You can allow additional configurations like:
For more flexibility, base your parameter on a table calculation rank measure.
Steps:
RANK([Sales])
<[Top N]>
Table calculations allow custom rank logic like handling ties or percentages.
For large data sets, use a level of detail (LOD) expression to optimize performance.
Steps:
TOPN
based on a parameter.LODs lead to fast ranking with live connection flexibility.
Exposing a parameter makes it easy for consumers to:
Careful parameter design provides user flexibility without complex data manipulation.
To recap, you can enable top and bottom filtering in Tableau with:
Top N parameters create interactive dashboards for data analysis. Users gain insights by dynamically ranking and filtering data.
Now you have the skills to build flexible top and bottom filtering in Tableau!
This article is part of our on-going series of Tableau guides. You might like to check out how to show top n in tableau or how to query in tableau
CONTACT
+44 (0)20 8446 7555
Copyright © 2023 JBI Training. All Rights Reserved.
JB International Training Ltd - Company Registration Number: 08458005
Registered Address: Wohl Enterprise Hub, 2B Redbourne Avenue, London, N3 2BS
Modern Slavery Statement & Corporate Policies | Terms & Conditions | Contact Us