MIP Logo

Swap Measures Using a Parameter in Tableau

This post was originally published on The Data School blog between 2018 and July 2025, before our program was renamed to MIP’s Analytics Career Accelerator. References throughout this article to “The Data School” or “DS” all refer to what is now MIP’s Analytics Career Accelerator. The program, its people, and its commitment to launching outstanding analytics careers remain the same – just under a new name.

If you are having trouble viewing this article, please report it here

Swap measures using a parameter in Tableau can reduce clutter effectively. Instead of using multiple charts of the same type for different measures, a single chart with a parameter allows users to toggle between multiple measures, helping to maintain a clean and tidy dashboard layout.

 

Step 1: Create a Parameter

In the Data Pane, click the drop-down arrow and select Create Parameter.

In the pop-up window, name your parameter, choose String as the data type, then click on List. Type your measure names one by one in the value list. You can also change the display name of each measure as needed. Your customized names will be what users see and can select from the parameter in your visualization. Once you’ve set up all the measures, click OK to proceed.

 

Step 2: Create a Calculated Field

This calculated field will link your actual measures with the names in your parameter value field. Ensure that the calculated field references the Value entries in your parameter (not the Display AS values).

 

Step 3: Set up Visualisation View

From the Data Pane, right-click and select Show Parameter on your visualization, then drag your calculated field to Rows and the measure you’re interested in to Columns.

Now you can select different measures to change the view of the bar chart via the parameter on the right side.

Share this post