One great thing about tableau is the number of options available to sort your data. However, if you’re not careful, ranking complex data can become misleading unless context is added!

For example, you want the top 10 most sold products across the US. This is fairly simple to sort, all we need to do is format our Product Name (discrete), by right-clicking, editing filter, and opening up the ‘Top’ tab, here we can sort fields by rank.

Image 1. Ranking by Top 10

Now that we know what our top 10 selling products are maybe it would be interesting to split the sales into different regions to analyse any other trends. So how would we see the top 10 products sold in the Central region? Firstly we would just drag in our region field into the filter shelf and select Central. Notice that it only shows the top 8 products in the Central region.

Image 2. Filtering by Region

This is because Tableau is considering each filter separately across the overall products. If you continue to filter through by different regions you’ll notice that each one is ranked differently. A quick fix for this is by right-clicking your regions filter and choosing the apply to context option. This will grey out your field and now your data will be ranked by top 10 regardless of your region. Tableau now recognises how to evaluate the top 10 filter based on the context we’ve set.

Image 3. Adding to Context