What is Sheet Swapping?

Are you new to Tableau? Sheet Swapping is a technique where you can "swap" out charts based on a selection in your dashboard. You can even toggle between layout containers by clicking on custom images.

In my example I have two charts displaying Profit by State. One chart is the map below;

The second chart is a Bar Chart displaying the Bottom 20 States by Profit.

In my dashboard I want the user to select if they want to see the Map or the Bar Chart. I also want to add an option for the Users to see all of the maps.

Sheet Swapping Using a Parameter

One way of performing Sheet Swapping is by using a Parameter. The parameter I created was called Sheet Selection and the selections are below.

On the Map worksheet I right-clicked at the bottom and selected Create Parameter.

I chose String for the Data Type and List under Allowable values. I then typed in All, Bar Chart, Map and clicked OK.

Next I needed to create a Calculated field to be able to use this Parameter. I created the Parameter below;

Sheet Filter

[Sheet Selection]

I then placed this calculated field on the Filter Marks card of my Map worksheet.

On the Filter pop-up menu, I selected Custom value list and typed in the word "All" and clicked on the plus sign. This places "All" in the filter. I then typed in "Map" and added it to the list. I then clicked OK.

Then I right-clicked on the Sheet Selection Parameter and selected Show Parameter.

If you select Bar Chart in this Parameter, you will notice the Map disappears. It will display for both the All and Map selections.

We now need to add this calculated field to the Filter Marks card of the Bar Chart worksheet. You will need to perform the same steps on the filter but enter Bar Chart (as well as All) as the values from the Custom value list.

After both of these filters are in place on the worksheets, I then proceeded to create a dashboard.

First I put a Text object on my dashboard to create a Title. Then I drag a Vertical container on the dashboard.

I then add the Map and Bar Chart worksheets into this container.

I delete the Legend that Tableau automatically adds for the Map, so I just display Parameter, the Map and the Bar Chart worksheets.

I then hid the Titles on both worksheets.

I also moved the Parameter to be closer to the Title.

Now all of the worksheets will display for the All Parameter option. Only the Bar Chart will display if Bar Chart is selected and so on.

If you wish to view this completed dashboard and download it; it is stored here.

There are other methods you can use for Sheet Swapping such as using Collapsible Containers. You can also use Navigation buttons. I will review these methods in an upcoming blog!

268 views0 comments