Today was our second official day learning Tableau. We covered a variety of topics however, I am going to be focusing on adding context to your filters.
This is going to be helpful if you read my last blog about filters as this is something you can use to take your analysis to the next level.
What is adding to context on a filter?
Using the add to context option on a filter allows you to filter by a Category before Tableau filters your overall data. Let me use an example.
Here I am using a filter to try and show the Top 10 states by Sales in the Eastern Region of USA. Do you notice a problem? It's only showing the Top 3.
Why is this?
Tableau is not filtering based on the Region but rather taking the Top 10 states from all of USA which include New York, Pennsylvania and Ohio and displaying them because they are in the Eastern Region. We don't want this, we want to see the Top 10 states ONLY in the Eastern Region.
How do we fix this?
We simply add to context on our Region filter. If you are doing something similar you can follow alongside. Right click on the filter you want to add to context and click 'Add to context'. Take a look and see what happens.
As you can see, our bar chart is now showing us the Top 10 states by Sales in the Eastern Region. Essentially, it is filtering the Region before the entire Country so we can now gauge a greater understanding of the states performance by region.
Thank you for reading my blog and have a good day!