Tableau Tuesday: How to Create a Top 10 and All Others Report

Data

Tableau Tuesday: How to Create a Top 10 and All Others Report

Client requests are sometimes the best way to think outside of the box with Tableau. Sometimes you ask yourself “WHY?” and shake your head. Other times, the requests force you to come up with a creative new solution within Tableau that you’ve never come across before.   

I recently had a request where the client wanted to see the top 10 followed by All Others with a Percent of Total. All Others simply aggregates everything that’s not included in the top 10. I have seen reports like this in the past, but never have I seen or built one in Tableau myself. Below are the steps I took to achieve a top 10 and all others type of report.  

Note: I was using the Sample Superstore English Extract for reference. 

The final report looks like this:  

Final report

First, create a view of Items sorted by Sum of Sales just to get yourself a visual. Next, Create a Set for the Top N Items by Sum of Sales. Add it to the front of the Rows shelf if you want to see the below. 

TOP N parameter is just an Integer Type with All selected.

 

Next we are going to create a new Top N and All Others Field to group everything outside our Top N into an Item Called Various. Replace your original Item Pill with this new Dimension

Next, we are going to create a Rank calculated field that will Display our Top N and All Others grouped together as one. Place this on the Rows in front of your Item Pill, and set to Compute by Table(Down)

 

We now have a report that looks like this: 

Almost there

To get the final report for Percent of Total, simply change the Sales pill currently in the view to a Percent of Total, and add SUM(Sales) to the view again to get both % and SUM in the view. 

If anyone has solved this in another way, feel free to shoot me an email at: dustin.wyers@interworks.com.

Thanks for reading Tableau Tuesday. 

More About the Author

Dustin Wyers

Analytics Consultant | Assist Lead - East
Advance with Assist: Filling in Null Records Without Filtering Question: I’m using a table calculation comparing the same month last year, and my view shows blanks due to the date range I have ...
Advance with Assist: Swapping Sheets in Tableau 2019.2 Tableau 2019.2 is full of new features. To name a few, vector maps, parameter actions, show/hide dashboard containers and spatial ...

See more from this author →

Subscribe to our newsletter

  • I understand that InterWorks will use the data provided for the purpose of communication and the administration my request. InterWorks will never disclose or sell any personal data except where required to do so by law. Finally, I understand that future communications related topics and events may be sent from InterWorks, but I can opt-out at any time.
  • This field is for validation purposes and should be left unchanged.

InterWorks uses cookies to allow us to better understand how the site is used. By continuing to use this site, you consent to this policy. Review Policy OK

×

Interworks GmbH
Ratinger Straße 9
40213 Düsseldorf
Germany
Geschäftsführer: Mel Stephenson

Kontaktaufnahme: markus@interworks.eu
Telefon: +49 (0)211 5408 5301

Amtsgericht Düsseldorf HRB 79752
UstldNr: DE 313 353 072