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 this 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 one rather than editing the old one.
How to Create Parameters in Tableau?
There are multiple ways to create Tableau Parameters. This example shows how to create, types of them, and how to use them as Filters.
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 Report
First Approach to Create Parameters in Tableau
Please click on the Drop down arrow in the upper right corner of a Dimensions region and select the Tableau Create parameters .. option.
Second Approach to Create Parameters in Tableau
The second Method to create this one is, Within the Data pane, Right Click on the Empty space to open the context menu. Please select the Create parameter.. option from it
Once you choose the option, a new window will open. Within the Name section, specify a Unique name for the Tableau Parameters, and provide the valid comment by clicking the comment button
Please select the valid Data Type name from the Dropdown menu. For instance, if you choose a String data type from the list, the param can only accept string data. Here, we are selecting Integer Data Type
The Display Format option allows you to format the tableau parameters value. For example, if you want the Select Top N Product param to show the range between 10 percent to 80 percentage, you can use the Percentage otherwise, select Automatic
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.
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 the value.
In some versions of Tableau, parameter control may display automatically. If this is not the case, please click on the Drop down arrow in the upper right corner of a param name and select the Show Parameter Control option.
Once we complete, you can see the control. By default, Our report will display Top 10 records because we specified the Current value as 10 while creating a Tableau parameter.
Let us change the number to Top 100. Notice that our report is displaying the Top 100 product names based on the number.
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 one, Please click on the Drop down arrow in the upper right corner of the param name and select the Edit.. option.
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 Step Size because we have only 130 records. If your records are more, please feel free to change this number to 50, 100 or thousand.
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 newly created name and select the Slider option.
Once completed, use the Slider to filter the Data based on the param number.
Tableau List Parameters
Let us change the Tableau parameter 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 Top 10 records
- Display As: This will be a label name. It would help if you used the more meaning full name here
By default, Tableau Parameters will display the number as 10 and label as Top 10. Notice that our report is displaying the Top 10 product names.
Let us change the number to Top 100. Notice that the report is showing the Top 100 product names.