This is the Second part in the Tableau Parameters Series.

Being able to show multiple charts on the same dashboard in the same space, or showing the same data but with different charts, or showing different data with different measures and dimensions using the same chart may be very useful to users with a specific requirement.

So let’s get started.

Create Parameter

  1. First, in the top right corner of the data pane, click the arrow and select “Create parameter…”
  2. Second, when the dialogue box pops up, change the name of the parameter, change the data type to “String”, click “List” from Allowable values, then add 2 values into the list of values (Sales and Profit for our example).
  3. Right click on the newly created parameter and select show parameter.

Create Calculated Field

  1. In the top right corner of the data pane, click the arrow and select “Create Calculated Field…”.
  2. Rename your Calculated Field and enter in the formula (see below).

Build the Chart

  1. Drag Order Date into the columns shelf, and the newly created calculated field onto the rows shelf.
  2. Click on the plus on year and then again on quarter. Next remove the year and quarter from the column shelf. Finally, change the month pill from discrete to continuous by selecting the down arrow on the month pill and select the continuous month.

We now have a switchable chart on the same worksheet.

Hopefully this has helped add more value to your dashboards.

 

Thanh Ho
Author: Thanh Ho