Tableau Parameters

This article will show how to Create Tableau Parameters with an example. They play a significant role in creating Dynamic reports. For instance, While creating Filters, we can replace the Constant value with this value. It means the Tableau parameters allow the user to dynamically set the Filter values per their requirement.

Apart from that, while creating Calculated Fields (or Calculations), we can replace the constant value with this value. Tableau Parameters allow the user to change the values. Remember, You can create a New one rather than edit the old one.

There are multiple ways to create Parameters in Tableau. This example shows how to create them, their types, and use them as Filters.

How to Create Parameters in Tableau?

First, Drag and Drop the Product Name from Dimension Region to Rows Shelf and Sales Amount Measures region to Columns Shelf. By default, Tableau will generate the Bar Chart. Please remember that we have 130 Rows in our Report. For more charts >> Click Here.

The First Approach to Creating Parameters in Tableau is to click on the drop-down arrow in the upper right corner of a Dimensions region and select the Create option.

  1. Add Reference Lines using the Parameter
  2. Show or Hide Reference Lines using the Parameter
  3. Date Calculation using Parameter
  4. Dimensions as Parameter to Filter the Report
  5. KPI with Param on Bar Chart
  6. String Parameter
  7. Start and End Date Filter using Parameter
  8. Calculated Fields
Tableau Parameters 2

The second method to create these Tableau Parameters is, Within the Data pane, Right-click on the Empty space to open the context menu shown above. Please select the above-mentioned option from it. The third option is using the Analysis menu.

Once you choose the option, a new window will open. Within the Name section, specify a Unique name for the Tableau Parameters, and provide a valid comment by clicking the comment button.

Please select the valid Data Type name from the Dropdown menu. The list includes Float, Integer, String, Boolean, Date, and Date & Time. For instance, if you choose a String data type from the list, the param can only accept string data. For this demo, we are selecting Integer Data Type.

The Display Format option of the Tableau Parameters allows you to format the value. For example, if you want the Select Top N Product param to show the range between 10 percent to 80 percent, you can use the Percentage; otherwise, select Automatic.

Change the Display Format option

We have three options in Allowable values. In this example, we show you three possibilities with an example. First, we are selecting the All option as Allowable values. Next, we added filter conditions on the Product Name. To do this, Please drag and drop the Product Name from Dimension Region to Filters Shelf. Once you complete it, a new window will open to write the condition.

For this Tableau Parameters example, we selected Top N products by the Sum of Sales Amount. And instead of writing a constant number 10, we added the value.

Set as Top 10 Filter

In some versions, Tableau parameters control may display automatically. If this is not the case, please click on the Dropdown arrow in the upper right corner of a parameter name (Select Top N Products) and select the below-marked option.

Show Parameter Control 9

Once we complete it, you can see the control. Our report will default display Top 10 records because we specified the Current value as 10 while creating it.

Select Top N Products using Tableau Parameter

Let us change the Parameter number to Top 100. Notice that our report displays the Top 100 product names based on the number.

Tableau Parameters to Select Top 10 and 100

Tableau Range Parameters

Let us see what will happen when we change the Allowable values from All to Range. To edit the existing one, click on the drop-down arrow in the upper right corner of the param name ((Select Top N Products) and select the Edit.. option. Please refer to the third image before this.

Let us change the Allowable values of Tableau parameters from All to Range and add the Minimum and Maximum numbers.

  • Minimum: Please specify the Minimum Range number. For now, we are adding 2 as the minimum number.
  • Maximum: Specify the Maximum Range number. Our report has 130 records, so we are adding 130 as a maximum number.
  • Step Size: Scale step size. For now, we are adding 5 as the Step Size because we have only 130 records. If your records are more, please feel free to change this number to 50, 100, or a thousand.
Choose to allow Minimum, Maximum, and Step Size

Please change the display option from Type Into Slider. To do this, select the Dropdown arrow in the upper right corner of the newly created Tableau Parameters name and select the Slider option.

slider Range

Once completed, use the Parameters Slider to filter the Data based on the param number.

Tableau Parameters as Top N products Slider 15

Tableau List Parameters

Let us change the Allowable values from range to List and add the List of numbers. For now, we are adding 4 numbers to the list.

  • Value: This is the number used to filter the data. For example, if we set the number as 10, the report will display the Top 10 records.
  • Display As: This will be a label name. It would help if you used the more meaningful full name here
Lists

By default, Parameters will display the number as 10 and label it as Top 10. Notice that our report displays the Top 10 product names.

Using List option

Let us change the number to the Top 100. Notice that the Tableau Parameters report shows the Top 100 product names.

Tableau Top N Filter using Parameters