When the data goes high, you can go low; to misquote a common saying. In this video I’ll show you how to start at a region level on your Tableau map and then drill into the State.
If you’re using the Tableau Superstore data set, make sure the Region and State fields are assigned to a geographic role. Most likely you will need to change the Region to a geographic role, which is created from the State field.
At a high level we’ll have a dual axis based upon the latitude, with the top latitude displaying the regions and the bottom latitude displaying the state. When we layer them on top of each other, we begin to create the illusion of the drill.
We’ll use a parameter creatively named [Region Parameter] which contains all of the regions. From there we’ll create a calculated field named [_States to show] as follows:
If [Region]=[Region Parameter]
In order to institute the drill, we’ll create a worksheet parameter action that will change the value of the region parameter on user selection. This causes the clause (
If [Region]=[Region Parameter]) to evaluate to TRUE which then causes the display to show the states for the selected region.
It sounds more complicated than it is, so just make sure to watch the video for understanding and clarity.
As a bonus, I’ll show you how to achieve this effect where the selected region does not cause the other regions to gray out. Notice on the second map how all the non selected regions do not lose emphasis; this is not the default effect. It’s the little “show-off” details like this that can up your Tableau game. You’re welcome!
You can thank me by watching, liking and subscribing:
All views and opinions are solely my own and do NOT necessarily reflect those my employer.
Do Great Things with Your DataAnthony B. Smoak