How to swap charts in Tableau using buttons

How to swap charts in Tableau using buttons

Look at your data in different ways and from different perspectives learning how to swap charts using buttons. For more efficient data analysis, you should look twice at the same data but from different angles. This strategy can lead you to gain more insights and more understanding of your charts.

Here are the steps of swapping charts in your favourite data analytics platform, Tableau. With the parameter action, you can easily switch from a chart type to another chart type to visualize KPIs in multiple ways.

In order to create this in Tableau, please follow these steps:

Step 1: Connect to data

In Tableau Desktop, connect to Superstore sample data provided by Tableau.

Step 2: Create the visualization

Create a parameter named Chart Type. From the Data Type select String and from the Allowable Values select List with the values: Area Chart, Bar Chart and Scatter Plot.

Create a calculated field named Chart type and insert here Chart Type Parameter.

Create a new worksheet named Area Chart. Drag Order Date on Columns an select it to be Continous month.

Drag the field Sales on Rows and then drag the field Chart type on Filters Area and select Area Chart.

Create another worksheet named Bar Chart. Drag the Sales on Columns, Category and Subcategory on Rows. Drag the Chart type calculated field on Filters Area and select Bar Chart.

Create another calculated field named Scatter Plot. Drag the Profit on Columns and Sales on Rows. Drag the Chart type on Filters Area and select Scatter Plot.

Create an Excel file with the column Chart type: Area Chart, Bar Chart and Scatter Plot and the import this excel file in Tableau.

Create another worksheet using the new datasource based on excel file, named Chart Types. Drag the field Chart type on Columns and select from the  Marks area Shape. Choose a shape for each graph type.

Create a dashboard named Chart Swap. Drag the worksheet Chart Types and then drag an horizontal container and here drag all the worksheets.

Go to DashboardActionChange Parameter. From the Source Sheets select Chart Types, for the Run Action on choose Select, from the Parameter select Chart Type Parameter, from the Field select Chart Type.

If you like video tutorials, we recorded for you the entire process as you can see in the #skillpill video below, created by our colleague Adelina Popescu, Data Analyst.

As Tableau Software Premier Partner we are continuously advising and supporting our customers in using Tableau for data analysis on a daily basis. This means understanding data and its evolution through creative and insightful dashboards. Our team of Data Analysts are qualified to explain and guide the company’s internal data teams in the journey to become more data-driven.

We hold the technical and sales certifications for all products: Tableau Desktop, Tableau Server, Tableau Prep, Tableau Data Management.

With Tableau Software – the best data visualization platform – you can always understand your business or your job better. Using Tableau, you will take smart and strategic decisions and you will quickly understand the data flow, numbers and results it produces.

Are you interested in learning more about one of the best analytics tools and implement the solution in the entire company? Contact us!