How to Create Parameters in Tableau

How to Create Parameters in Tableau

4 mins read461 Views Comment
Vikram
Vikram Singh
Assistant Manager - Content
Updated on Jun 27, 2022 16:13 IST

In this article, we will discuss step by step how to create parameters in a tableau, how to edit and delete the created parameter, and finally, how to use parameters in the filter.

2022_06_feature-images_TABLEAU-PARAMETERS.jpg

Table of Content

Recommended online courses

Best-suited Tableau courses for you

Learn Tableau with these high-rated online courses

39.54 K
2 hours
– / –
45 hours
– / –
4 weeks
– / –
4 weeks
2.25 K
4 weeks
Free
12 hours
– / –
1 hours
19.89 K
16 hours
– / –
3 hours
19.7 K
6 months

What are the Parameters in Tableau?

A parameter is a workbook variable such as a number, date, currency, location, or string that can replace a constant value in a calculation, filter, or reference line.

In simple terms, a parameter is any value(number, date, location, etc.) passed to a program in order to customize the program for a particular purpose.

It allows you to add conditions and select the range of values for which you want to create a parameter. 

Example: You want to create a calculated field that returns:

  • Profit: if the in any state is greater than 3.5 million USD
  • Loss: Otherwise

You can replace this constant value of “3.5” in the formula with the parameter.

Tableau also allows the creation of a dynamic parameter that automatically refreshes its current value, list of values, or range of values. 

Parameters are useful when you want to add interaction and flexibility to a report with a what-if scenario.

Now, we will learn a step-by-step process to create a parameter in a tableau.

How to Create a Forecast in Tableau
How to Create Hierarchies in Tableau
How to Create Group in Tableau

Must Check: What is Tableau?

Must Check: Tableau Online Courses & Certifications

How to create Parameter in Tableau?

Steps to Create

  • Connect to Sample Superstore Data
  • Select “Create Parameter” from the drop-down in Data Pane

  • The “Create Parameter” Dialog box will appear.

  • Name the parameter (name should be precise and understandable by the user)
  • Specify the Data type (Float, Integer, String, Boolean, Date, Date & Time)
  • Specify the “Current value” (this is the default value for the parameter)
  • Select the “Display Format” from the drop-down
  • Now, the final option to select is Allowable values
    • Here, you have to select how the parameter will accept the values
    • It has three options:
      • All
      • List
      • Range

These options are available depending on the Data type you selected.

Example: 

  • String Data type can only accept all values or list
  • Boolean Doesn’t accept any
  • The remaining accept all three( All, List, or Range)

Note: If you select a

  • List
    • You must have to specify the list of values
      • Type a list of values by clicking in the left column, or
      • Add members of the field by selecting “Add values from.”

  • Range
    • You must have to specify the minimum, maximum, and step size

  • Click OK

The new parameter is listed under the Parameter Section in the Data Pane.

Now, we will take an example to get a better understanding of Parameters in Tableau:

How to Create Sets in Tableau
Sort Data in Tableau
Connecting data in Tableau

Example

Problem Statement: Create a parameter to find the top 5 sub-categories based on sales.

Steps to Create

  • Connect the Sample Superstore Data
  • Drag and Drop Sales and Sub-Category into column and row shelf respectively
  • Drag and Drop Region into Color in Marks Pane

  • Select “Create Parameter” from the drop-down in Data Pane
    • Name the Parameter “Top 5 Sub-Category
    • Select the Data Type “String
    • Select “List” from Allowable Values
      • Choose “Sub-Category” from “Add values From

  • Click OK

The new parameter is listed under the Parameter Section in the Data Pane.

Now, to use the created parameter 

  • Right-click on “Top 5 Sub-Category” -> Select Add to Sheet

Working with Parameters

In Tableau, we can easily edit or delete parameters:

Edit a Parameter:

  • Right-click on the parameter you created (from the parameter section)
  • Select Edit

  • “Edit Parameter” dialog box will appear
    • Edit Parameter dialog box is exactly the same as Create Parameter dialogue box
  • Make the necessary modification in the Edit Parameter dialog box

  • Click OK

Delete a Parameter:

  • Right-click on the parameter you created (from the parameter section)
  • Select Delete

In addition, to edit or delete, we can also copy, duplicate, rename, and hide the new parameter.

How to Create Calculated Field in Tableau
Level of Detail(LOD) Expression in Tableau
Date Functions in Tableau

Parameters in Filter

Parameters can be applied with the filters. It gives a way to modify values in Top N filters.

Parameters can be applied with the filters. It gives a way to modify values in Top N filters.

A list of parameters is available in the drop-down lists of the Top tab of the Filter Dialog box

You can also add a new parameter instantly by selecting “Create a New Parameter” from the drop-down and then again following the steps to create parameters.

Conclusion

In this article, we have discussed step by step how to create parameters in a tableau, how to edit and delete the created parameter, and finally, how to use parameters in the filter.

Hope this article, will help you in your data analyst journey.

Top Trending Articles:

Introduction To Tableau | Products Of Tableau | Data Types In Tableau | Change Data Type In Tableau | File Type In Tableau | Data Aggregation | Connecting Data In Tableau | Dimension And Measure | Tableau Show Me | Joins In Tableau | Union In Tableau | Operators In Tableau | Number Functions In Tableau | String Functions In Tableau | Filter In Tableau | Context Filter In Tableau | Filters In Tableau | Types Of Charts In Tableau | Bar And Line Chart In Tableau | Pareto Chart In Tableau | Gantt Chart In Tableau | Box And Whisker Chart In Tableau | Waterfall Chart In Tableau | Donut Chart In Tableau | Funnel Chart In Tableau | Dual Axis Chart In Tableau | Sort Data In Tableau | Tableau Sets | Groups In Tableau | Tableau Hierarchy | Tableau Forecasting | Highlighting In Tableau | Word Cloud In Tableau | Cohort Analysis In Tableau

About the Author
author-image
Vikram Singh
Assistant Manager - Content

Vikram has a Postgraduate degree in Applied Mathematics, with a keen interest in Data Science and Machine Learning. He has experience of 2+ years in content creation in Mathematics, Statistics, Data Science, and Mac... Read Full Bio