How to Create A Self-Adjusting 'Others' Category in Tableau

In this post, you will learn how to create a chart like this where the category 'Other' is dynamically self-adjusting itself based on the data. Data for this post can be downloaded from here.

The colored Others bar is self adjusting, that means it can combine categories automatically which are small enough to not to be shown separately

The colored Others bar is self adjusting, that means it can combine categories automatically which are small enough to not to be shown separately

Following the Pareto's famous 80:20 rule, most of the value of anything is contributed by a handful of members, let's say 80% of sales by 20% customers or 80% of tweets by 30% users. And in all the Pareto charts it leaves a looooong right tail of small contributors.

Here is an example from my Twitter Dashboard for Tableau Conference which tracked #data16 conversation. I wanted to show how many tweets are being from which App Platform. The raw data gave me a picture like this:

See, most of my interest is in the left side head and that long tail of small values is just boring. Can't I somehow get rid of this?

See, most of my interest is in the left side head and that long tail of small values is just boring. Can't I somehow get rid of this?

Gosh! That long boring tail making my chart look so ugly and boring, and most importantly not leaving enough room to focus on key areas of charts. What can I do? Here are my possible solutions

  1. Put the scroll bar
  2. Group all those items in the tail manually and rename them as 'Others
  3. Just filter those small values out, after all they hardly make 10% of tweets in total

Well, I don't want to put a scroll bar on an elegant social media dashboard. What what if after grouping those items in tail as Others manually, some new items come tomorrow after I refresh the data? I don't want to keep grouping those new values manually forever. Next, I would be very uncomfortable to filter those small values out for two reasons: it wouldn't show a 100% picture, second who knows when any of those small value gets a significant large number tomorrow, but I won't be reporting it, because I assumed it now that it is small enough! So what shall we do? Here is what I did:

I created a category called 'Others' which will contain all those small factors on the tail and group them together. How did I define small? Well, this is a case of trial and error, in this case, I did not want to see any tweet platform separately which contributed to less than 2.5% of total tweets. In your case this threshold can be different but I am sure, you will find an optimized one. Here are the steps to follow:

Step 1: Create A New Dimensions from App

  • Create a new calculated field Apps
IF {FIXED [App] : SUM([Number of Records])} / {SUM([Number of Records])}
< .025 THEN 'Others' ELSE [App] END

Step 2: Create View

  • Drag Apps to rows
  • Drag Number of Rows to columns
  • Sort in descending order

Step 3: Set Colors

  • Create a calculated field Apps Color
IF [Apps] = 'Others' THEN [App] ELSE 'NonOther' END
  • Drag Apps Colors on Color Shelf
  • Click on Colors > Edit Colors > Select Color Pallet > Hue Circle > Assign Palette > Apply
  • In the select data item on the left, scroll to the item 'NonOther' and give it a dark grey color
  • OK

There you go! You just created a self adjusting 'Others' category which changes itself when your data changes :)  Happy Data Vizzing!

 

my twitter test test