Sheet swapping is a great way to display information on a dashboard without cluttering. In this blog I am going to cover the new way you can swap sheets in Tableau.
For the purpose of this exercise, I will be using the Sample Superstore dataset found in Tableau. It is also important to make sure you are using the new Tableau update version 2022.3.0
Let's start!
Let create the charts we need. One will be a bar chart and the other will be a map.
Creating a bar chart.
Step 1: Drag State/Province to Columns and Sales to Rows. To order your bar chart from biggest to smallest select the bar icon with the arrow pointing down found in the tool bar.
Creating a Map
Step 2: Double click Country/Region and State/Province, this should create a map. To get the coloured segments simply drag sales to colour.
Step 3: Create a Parameter. Click on the down arrow next to the search bar and select Create Parameter. A pop up should appear. Name your parameter whatever you like (sheet swap). Then change your data type to a string and select list and input the names as shown below.
Step 4: Create two calculated field, one called bar and the other called map. In these calculated field. Drag and drop the parameter you previously created (sheet swap) in the calculated field and make it equal to either bar or map like shown below.
Step 5: Let's build our dashboard. Drag the horizontal container onto the dashboard. Then drag the two sheets you created either side of the horizontal container. Like shown below.
Step 6: Now onto the fun part, sheet swapping. Click on the bar sheep on the dashboard, then go to layout and tick control visibility using value. On the drop down select bar. Repeat the same process with the map sheet and this time select map on the drop down instead of the bar. Like shown below.
Your dashboard should look like this.
Step 7: Final step. To show the option between Bar and Map. Follow the image below.
And that's it, you can now swap sheets!