During the second week in the Data School, we were been training Tableau. What impressed me most is the Parameters function in Tableau. You can achieve multiple goals using Parameter and it can give the audience more control to your Dashboard and save space for showing more information.

To utilize the Parameters, there are 4 steps you should follow:

  1. Create your Parameter
  2. Show the Parameter
  3. Use it in a Calculation, Reference line, Set, or Filter.
  4. Apply the Calculated Field in the Viz

If you are still on the beginning stage and would like to follow the basic steps to practice first, here are some articles you can refer to one from Tableau Desktop and Web Authoring Help and the other from InterWorks.

With the Parameter, we can allow users or ourselves to play around with Dynamic reference line, choose different dimensions and measures, select Aggregation methods, manage the Top N, save dashboard space to switch worksheets, rank the field by Ascending or Descending order. In this blog, I would like to mention 3 use cases with Parameter.

1. Use Parameter to choose different dimensions and measures:

Using ‘Create Parameter’ create a Parameter using ‘Integer’ as Data Type to get easier control to the next step. Type the dimension names or measure names in the ‘Display As’. Click OK and ‘Show Parameter’.

Then create a Calculation field to tell Tableau what to do with the Parameter:

Drag the Calculation to Columns and use it as a dimension or measure, then you can control the view by selecting them on the right:

2. Use Parameter to choose different calculation type

This setting allows users to have their own way to explore data. To accomplish the setting, I combined it with the dimension selection parameter ‘ Is chose method’:

First, create a parameter ‘ Choose a method’ and then show the parameter using the way as I mentioned above:

Then create the calculation field like below.

The last step is to create a Calculation relate to both this parameter and calculation we create above ‘Is chose measure’. Then you can select any calculation method on the right of the pane:

3. Use Parameter to choose your reference line.

When you would like to add a reference line to the Viz, let’s assume the manager as a user would like to set a target to the Profit by interact with the dashboard you created. Try to give the control to your users by using the dynamic parameter: Create a Parameter first, this time use ‘Range’ instead of  ‘List’. So the users can choose any number he likes.

First, create a parameter named ‘Profit Target’. Instead of Using ‘List’, this time we use ‘Range’ and give the minimum and maximum value of it. Leave other things default. Then, click ‘OK’.

Go to the Analytics board and drag a ‘Reference line’ to the view. Edit the pane like below:

Show the parameter to the right board. Now the users can have their reference line to control.

The parameter is one of my favourite functions and I will never stop exploring it. Next time we can talk about how to use the parameter to switch worksheets in a dashboard to save space and make it more elegant.


Leona Lai
Author: Leona Lai