Chapter 59. How to Dynamically Display the Top N Versus Other
There are times when I like to see every dimension member represented in a data visualization. For example, scatter plots are a great choice whenever you want to view many data points in the same space. Iâll also occasionally create a bar chart or histogram with every dimension member, even if it causes a vertical or horizontal scroll bar to appear.
Although the long-tail insights these charts can provide have value, I tend to focus on the few dimension members causing the biggest impact on the business Iâm analyzing. For this reason, I often show the Top N (usually Top 5 or Top 10) and group everything else into its own segment. And while I donât advocate the use of pie charts (see alternatives in Chapter 52 from Practical Tableau, OâReilly, 2018), I do always say that if you must use them, stick to five slices or fewer including Other. This chapter demonstrates how to dynamically display the Top N based on the number of dimension members the end user wants to show and how to group everything else into a segment for Other.
How to Group the Top N and Everything Else with Parameters and Sets
The first step to showing the dimension members of the Top N and grouping everything else into one line is to create a parameter for the Top N. This will eventually allow the end user to choose how many individual dimension members to show (i.e., Top 5, Top 6, Top 7).
The allowable options are flexible and up to you, but ...
Get Innovative Tableau now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.