Tableau Parameters

In this article, we will show how to Create Tableau Parameters with an example. Tableau Parameters play a significant role in creating Dynamic reports. For instance, While creating Filters, we can replace the Constant value with the Tableau Parameter value. It means the Tableau parameters allow the user to set the Filter values dynamically as per his/her requirement. Apart from that, while creating Calculated Fields (or Calculations), We can replace the constant value with the Parameter value. Tableau Parameters allow the user to change the values.

Remember, You can create a New parameter in Tableau rather than editing the old one. For this Tableau Parameters demo, we use below SQL Query.

SELECT Cust.FirstName + ' '+ Cust.LastName AS [Full Name], 
       Cust.YearlyIncome, 
       Cust.EnglishOccupation, 
       Fact.OrderQuantity, 
       Fact.TotalProductCost, 
       Fact.SalesAmount, 
       Fact.TaxAmt, 
       Fact.OrderDate
FROM FactInternetSales AS Fact 
   INNER JOIN
     DimCustomer AS Cust ON Fact.CustomerKey = Cust.CustomerKey

How to Create Tableau Parameters

There are multiple ways to create Tableau Parameters. This example shows how to create Tableau Parameters, Types of Parameters, and how to use them as Filters 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, We have 130 Rows in our Tableau Report

Tableau Parameters 1

First Approach to Create Parameters in Tableau

Please click on the Dropdown arrow in the upper right corner of a Dimensions region and select the Create parameter.. option.

Tableau Parameters 2

Second Approach to Create Parameters in Tableau

The second Method to create a parameters in Tableau is, Within the Data pane, Right Click on the Empty space to open the context menu. Please select the Create parameter.. option from it

Tableau Parameters 3

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

Tableau Parameters 4

Please select the valid Data Type name from the Dropdown menu. For instance, if you choose a String data type from the list, the parameter can only accept string data. Here, we are selecting Integer Data Type

Tableau Parameters 5

The Display Format option allows you to format the tableau parameters value. For example, if you want the parameter to show the range between 10 percent to 80 percentage, you can use the Percentage otherwise, select Automatic

Tableau Parameters 6

We have three options in Allowable values. In this Tableau parameters example, we show you three possibilities with an example. First, we are selecting the All option as Allowable values.

Tableau Parameters 7

Next, we added filter condition on Product Name. To do this, Please drag and drop the Product Name from Dimension Region to Filters Shelf. Once you complete, a new window will open to write the condition.

For now, we selected Top N products by Sum of Sales Amount, and instead of writing a constant number 10, we added our parameter value.

Tableau Parameters 8

In some versions of Tableau, parameter 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 and select the Show Parameter Control option.

Tableau Parameters 9

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

Tableau Parameters 10

Let us change the value to Top 100. Notice that our tableau report is displaying the Top 100 product names

Tableau Parameters 11

Tableau Range Parameters

Let us see what will happen when we change the Allowable values of Tableau parameters from All to Range. To edit the existing Tableau parameter, Please click on the Dropdown arrow in the upper right corner of the parameter name and select the Edit.. option.

Tableau Parameters 12

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

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

Please change the Tableau parameter display option from Type In to Slider. To do this, select the Dropdown arrow in the upper right corner of the parameter name and select the Slider option.

Tableau Parameters 14

Once completed, use the Tableau Slider to filter the Data.

Tableau Parameters 15

Tableau List Parameters

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

  • Value: This is the value tableau will use to filter the data. For example, if we set the value as 10, the report will display Top 10 records
  • Display As: This will be a label name. It would help if you used the more meaning full name here
Tableau Parameters 16

By default, Tableau Parameters will display the value as 10 and label as Top 10. Notice that our tableau report is displaying the Top 10 product names.

Tableau Parameters 17

Let us change the value to Top 100. Notice that the tableau report is showing the Top 100 product names.

Tableau Parameters 18