Power to the user – Parameters part 5 – Swap views

Welcome to “Power to the user” blog post serie about parameters.

This blog post is about using parameters to swap sheets in the view. The previous blog post was about Top N and sorting with parameters, click here to go and read it if interested.

Why would you do that?

For multiple reasons, actually.

For example, one of the most common use case is that a dashboard is used from different people/ teams in the business and maybe some of them prefer to look at the data with a scatter plot and others prefer to see it in bars.

Another reason may be that some people in the business want to see the data at a specific level of detail while others want to see it in another way and maybe this was not achievable using filters for some reasons.

To be honest, I used this feature a lot of times at clients, in particular for the first reason: people in the business wanting to look at data in different ways. Or people in the business that also wanted to look at the data visually (chart) or just in a table. As we know, a table is not a chart, but sometimes it can be used for exporting data, in particular if the amounts/ values we show in the chart are rounded at k or M, while they are not in the table (if you show the full amount).

But I guess I will explain a bit better about this and what are the option in a future blog post, let’s not get lost!

For this example, I am going to use Sample Superstore data. 

The business in our company wants to look at profit, sales and also quantity by customer name. Some people like to look at sales vs profit by customer with a scatter plot, while others prefer bars. Instead of making 2 different reports or having 2 charts in the same dashboard that are representing the same thing, we can use a parameter.

Step 1

Build the scatterplot view as below, sizing each dot (customer name) with the quantity field


Step 2

Build a bar chart with profit, sales and quantity by customer name as below

bar chart

Step 3

Create a parameter called “Show Scatter or bar chart” as below


Step 4

Create a calculated field which will be a boolean saying [Show Scatter or bar chart]=1 (correspondent to Scatter plot), drag this on the filter and select True in the Scatter plot view, select False on the bar chart view.

Step 5

Build a dashboard, add a vertical container first, then drag into it both the Scatter plot view and the bar chart view making sure they actually fall inside this vertical container. Then hide the titles and add into the dashboard the parameter, so the user will be able to swap between these 2 views, add a title, maybe add a summary table showing total sales, profit and quantity and below is the result!

Business dashboard.PNG

bar view.PNG

If you want to download the workbook, I published it on my Tableau Public, click here to be redirected to it and download to check how it was made.

I hope you enjoyed the reading!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s