Create Parameters in Tableau – An Easy-to-follow Process
In this tutorial, we will learn about another interesting and useful feature of Tableau that is Tableau parameters. Here, we will try and gain a good understanding of the parameters in Tableau and their use in Tableau. We will start by discussing the definition of parameters followed by learning how to create parameters and use them in Tableau.
Keeping you updated with latest technology trends, Join DataFlair on Telegram
Parameters in Tableau
Parameters are like containers of values in Tableau. We can use parameters dynamically to enter values that are not fixed or present in our data set originally. For instance, we can enter a more than/less than condition into a parameter, set a range for values that we wish to focus on in our analysis, select top values, etc.
We can program the Tableau parameters in such a way that at the user end, the control of the dashboard shifts entirely to the user from the author. A user can easily interact with the dashboard elements through parameter values. A parameter can be a string value, a numeric value, a range of numbers, a currency and a lot more. Thus, in this way parameters offer a lot of flexibility and freedom to the Tableau users to think of new scenarios and play with data in a manner that gives them maximum output in the form of useful insights from data.
Steps to Create a Parameter in Tableau
Follow the steps given in this section to create a parameter in Tableau.
Step 1: To create a parameter, click on the drop-down arrow present on the top right corner of the Data pane. Select Create Parameter option from the drop-down menu.
Step 2: A Create Parameter window will open. From this window, you can give a name to the parameter, select its data type, set current value, allowable values, etc.
We can add a data type we prefer from the list of available data types as shown in the screenshot below.
Step 3: You can also select a display format for the parameter that you are creating. The formats available are Number, Currency, Scientific, Percentage, Automatic, Custom, etc.
Step 4: From the next option of Allowable values, you will find three options; All, List and Range. This means that we can either select all the values within a field and create a parameter. Or we can have a list of values of our choice from the field or we can set a range within which we would like to have values in the parameter.
For instance, let us add field values for our parameter from the Add from field option. We select the field Sub-category from our list of fields.
A list of all the values within a field appears in the List of values section. You can remove selected field values from the cross (⨯) icon given next to them. Once you are done with selecting or removing values from the field, click on OK.
Step 5: In this way, the newly created parameter “Top 10 brands” starts showing in the Parameters section given at the bottom left.
Using a Parameter
Once a Tableau parameter gets created we can add it to a sheet by right-clicking on the parameter’s name and selecting Add to Sheet option. From this drop-down menu, you can use a lot of other options on the parameter such as edit, copy, duplicate, rename, hide, delete, create, describe, etc.
If you select the Show Parameter Control option, a new parameter control box appears on the right from where you can enter values manually to view selected parameter values.
To hide this card or box, right-click on it and select the Hide Card option. Also, from this drop-down menu, you can edit the parameter, edit title, format the parameter and select the type of parameter card such as Type In, Single Value List, Slider, and Compact List.
Edit a Parameter
If you wish to edit an already existing parameter, right-click on the name of the parameter and then select Edit.. option from the drop-down menu.
Parameters in Filter
We can also use the parameters while applying filters. Also, we can instantly create new parameters from the Filter window. To do this, open the drop-down menu and select Create a New Parameter.. option.
In the next window, you are given the options to create a new parameter from scratch.
Here, we create a range of 10 values. Click on OK once you are done with creating the parameter.
As you can see in the screenshot below, a Tableau parameter filter of the top 10 brands or sub-category values is applied to our bar graph. This graph only shows region-wise sales for the top 10 electronic brands.
We can also manually enter values in this type-in filter. For instance, we only want to see the sales for the top 6 brands instead of 10. This can be achieved by entering number 6 in the filter. By doing this, Tableau will show the sales value for the top six brands.
Learn to Apply Different Filters in Tableau
In this tutorial, we learned about parameters in Tableau. We saw how to create a parameter in Tableau following which, we saw how to use parameters after creating them, how to edit them and apply parameters as filters. We hope you were able to easily understand and learn about parameters from this tutorial.
Any queries in the Tableau Parameters Tutorial? Drop them in the comment section below.