Tableau Tips: Selecting Top 3 Within Categories




Hi All,

In this blog I would show you how to get the top three sub categories under each Category. For this we would use the sample dataset provided tableau (can be downloaded from here : Sample Superstore ) .

Basically what we would want to achieve is the top three selling sub categories under Furniture , Office Supply and Technologies.

Following is what the sub category sales looks like across all Categories:

SubCatSales

And this is what we would like to achieve :

Desired Result

 

The trick to get this is to use the Index function in tableau. With the use of index function we create a ranking in the sales of the subcategories within category. The Index function then needs to be put in filter mark , Computed Across Sub Categories , and the range for it has to be set up ( 1 to 3 in this case ).

The following gif explains the process :

 

Do let me know if you are not able to follow the steps.

Thanks
Rahul Singh




1 Comment

Leave a Reply

Your email address will not be published.


*