We often have multiple charts in a dashboard which can make it difficult for users to select or switch between charts and sheets to look for information.

There are several ways to solve the issue.

Today I will demonstrate one of the methods called sheet swapping, which involves using a parameter, a filter and a container.

Let’s start with the dashboard below. As we can see on the right-hand side of the dashboard, there is a filter for the users to select different charts in the same container.

 

 

First Step

The first step is to choose any dataset you want and build a few charts.

I used a fruit nutrition dataset in this example and created 4 charts.

 

 

Second Step

The second step is to create a parameter.

I named the parameter ‘Choose Chart’, set the data type as a string, set a list of the sheet names and click ok.

We then need to create a calculated field named ‘Chosen Chart’, drag the Choose Chart parameter in the calculated field and click ok.

 

 

Third Step

The third step is to show the parameter and drag the calculated field ‘Chosen Chart’ onto the filter shelf.

We will then need to create a custom value list that will force the expression to be true.

It’s important to note that here we are creating our own value list, not searching from the values that exist in the dataset.

For Sugar Density sheet, we need to type Sugar Density & add it, type All & add it. (The All is to tell Tableau to show all the charts.)

Once the custom value list is created, click ok.

We haven’t noticed anything has changed yet.

However, once we go to the parameter and choose other charts in the Sugar Density sheet, we won’t be able to see other charts, that’s because we’ve told Tableau to return the chart that we’ve selected.

We will have to repeat the third step for the other 3 sheets, making sure the name in the custom value list is the same as the name of the sheet that you are working on.

 

 

Last Step

The last step is to build a dashboard.

We need to drag a container to the dashboard, and drag all the charts that are set to the parameter that we’ve created.

We can see that four charts are occupying and sharing the same container.

We then now choose one chart, in this example, I chose the Carb Density chart and Tableau returned only the Carb Density chart, the other three charts have collapsed.

If we don’t want the individual title to show up, we can hide all the individual titles and create a dynamic title, which will change the title when we choose a particular chart.

I added a floating text box into the dashboard and you will see the Edit Text box. On the top right-hand corner, click insert and choose the ‘<Parameter.ChooseChart>’, and we will have a dynamic title on the dashboard.

 

Hope you find this tutorial helpful. I will share more Tableau tutorial in a few weeks time.

The Data School
Author: The Data School