Tableau Tips: Top/Bottom N members (use of sets)
Updated: May 17
In daily today operations of businesses, different decisions are required to be made based on different scenarios institutions face, in many instances analysts find themselves overwhelmed due backlog at hand and therefore availability of an easier way to answer such short simple business requests could help them a lot.
In our today's challenge, I will show you how to populate the Top/Bottom 10 profitable customers using Tableau sets.
Create set - Top set
Once you've connected to Superstores data set above, follow the steps below to create the top set.
Right click on dimension Customer Name >> Create >> Set
On the pop up menu fill as show below.
Create - Bottom set
Repeat the above procedure to create the bottom set, see below.
Next, I am going to combine the two sets to create a single set called 'Top/Bottom 10 profitable customers'
Top achieve this
Right click on one of the two sets above and select 'Create Combined Set'.
On the dialogue box that pops up fill as show below.
Note the above set, returns all members from the two sets combined.
Lets build our chart.
Drag dimension Customer Name to the Row shelf.
Drag measure Profit to the Column shelf. (Note profit is aggregated by SUM(), you can correct this if your default aggregation is different)
Sort the chart in descending order by clicking on the sort icon on the tool bar.
Next drag the set 'Top/Bottom 10 profitable customers' into the filter shelf.
Drag either 'Top 10' or 'Bottom 10' set to the color shelf to differentiate Top customers from the Bottom one's. (Optional)
See the resulting chart.
Note: In the above chart, the set 'Top 10' set was dragged to the color shelf and IN members edited to 'Top 10' while OUT members were edited to 'Bottom 10'.
I hope this article was helpful to you.
To receive more of the Tableau tips and tricks, kindly subscribe to our mailing list below.
Thank you for reading.