What Are Tableau Parameters And How To Create Them In 5 Minutes?

three women sitting at table with laptops


Tableau gives you the option to create parameters which make your visualizations interactive. But what are Tableau parameters and how do you create them?

In this article, we’re going to discuss what parameters in Tableau are. How can you create the top 5 Tableau parameters within 5 minutes, and what’s the difference between filters and parameters. So let’s begin.

Desktop Specialist

Learn more about Desktop Specialist Certification.

Data Analyst

Learn more about the Data Analyst Certification.

Server Certified

Learn more about the Tableau Server Certification.

Ready to contribute to the Tableau community? Get $30 for sharing your work and certification experiences. Write and get paid for every article. Learn more »

What are Tableau parameters?

Tableau parameters are workbook variables (which means they can be applied to all the sheets within the workbook) like numbers, strings or calculated fields which replace a constant number in the data set to change the visualization as desired.

For example, you can use a parameter to see the top 5 most profitable months of the year. The visualization will adjust itself t show you only the top 5 months. Or you can use a parameter to adjust the visualization showing you the monthly sales of the entire year to show you the weekly or daily sales of the year.

Keep reading: Tableau Desktop Specialist Certification Questions »

Loading RSS Feed
What are Tableau parameters
What are Tableau parameters

Benefits of using parameters:

Tableau parameters allow you or the end-user to control the input. You can adjust the data representations and visualizations according to your requirements. You’ll be wondering this is what filters do then why do we need parameters?

Filters work on the worksheet level while parameters work on the workbook level and this is the biggest advantage of tableau parameters. If you’ve 50 sheets within a workbook you’ll have to manually apply filters to all of them but you can easily apply parameters to the whole workbook or selected worksheets.

So parameters minimize the manual work of analyses and visualization. Make things interactive and give more control to the end user.

Keep on Reading: Tableau Data Analyst Certification Questions »

How to create Tableau parameters?

There are multiple types of parameters in Tableau. Here I’m going to show you how you can easily create the most important ones.

Top N parameter:

This is one of the most famous parameters in Tableau.

Top N parameter is used for knowing the top 5, 10, or the top 20 whatever metric you’ve. The visualization will only show you the top ones and will hide the other data. Let’s see how to create a Top N parameter in Tableau.

  • Create a sheet and import sample data.
  • Once you have the data create a visualization.
  • To apply the parameter, drag the sub-category into the filters box.
  • A dialogue box will appear on the screen.
Tableau Top N parameter 1
  • On the top of the dialogue box, you’ll see the option of “Top”. Select that.
  • Select “by field”.
  • Choose “create a new parameter”.
  • Now give a name to your parameter.
Tableau Top N parameter 2
  • Choose the list option.
  • Write the N value in the value section and the display text for it in the “display as” section. For example, I want the top 5 sold products, the value will be 5 and the display text will be the top 5 sold products.
Tableau Top N parameter 3
  • Keep the aggression sum always.
  • Click ok.
Tableau Top N parameter 4

You can see the parameter in your parameter section. Now let’s apply this to our visualization.

  • Right-click the parameter and select “show parameter” from the drop-down menu.
Tableau Top N parameter 5
  • It’ll appear on the right side of your screen, from there you can select the top 10 or top 5 whatever values you’ve created and your visualization will change according to it.

Date field parameter:

The date field parameter is extremely useful when you have a set of data associated with dates. You can adjust the visualization to yearly, monthly, weekly and daily metrics as well.

You’ll need data set with dates. Import it in a new sheet, visualize it and let’s move ahead toward creating data field parameters in Tableau.

  • Click the arrow on the top left corner of your screen.
  • From the drop-down menu choose “create parameter”.
Tableau date field parameter 1
  • A dialogue box will pop up on the screen. 
  • Name your parameter.
  • Choose string as your datatype.
  • Choose “list” from the options below.
  • Add values (year, quarter, month, week and day) and their display as.
  • Click Ok.
Tableau date field parameter 2

You can see this parameter in the parameter section. Now you need to create a new calculated field according to your values. Let’s see how to do that.

  • Click the same arrow on the left of your screen and select “create calculated field” from the drop-down.
Tableau date field parameter 3
  • A new dialogue box will appear.
  • Name it.
  • You can paste this code there as shown in the picture.
Tableau date field parameter 4
CASE [Date Parameter ]
WHEN "Year" THEN STR(YEAR([Order Date]))
WHEN "Quarter" THEN STR(YEAR([Order Date]))+"/Q"+ DATENAME('quarter', [Order Date])
WHEN "Month" THEN DATENAME('month',[Order Date])+""+STR(YEAR([Order Date]))
WHEN "Week" THEN "Week" + STR(DATEPART('week',[Order Date]))
WHEN "Day" THEN STR(DATE([Order Date]))

You’ve successfully created the calculated field, you can find it in the dimension panel. Let’s apply the parameter to our visualization now.

  • Use the parameter by right-clicking it and selecting “show parameter” from the dropdown menu.
  • It’ll appear on the right side of the screen where you can select your desired values and your visualization will turn according to it.

Dynamic dimension parameter:

Dynamic dimension parameter allows you to change the dimension of your visualization. Let’s see the steps of creating dynamic dimension parameter in Tableau.

  • In a new sheet open a new parameter window from the arrow on the left as we did before.
  • Name your parameter.
  • Choose the data type as “string”.
  • Select allowable values as “list”
  • Add values (category, segment and ship mode) in the value section.
  • Click ok.
Tableau dynamic dimension parameter 1

Now let’s create a new calculation field.

  • Open the calculation window from the arrow on the left side.
  • Write this code there as shown below and click Ok.
Tableau dynamic dimension 2
CASE [Dynamic Dimension]
WHEN "Category" THEN [Category]
WHEN "Ship Mode" THEN [Ship Mode]
WHEN "Segment" THEN [Segment]

Your parameter and calculated field will now be visible in the parameter and dimensions section on the left side. Let’s execute our parameter now.

  • Pull the calculation field and category to the column section.
  • Bring the other metric (in this case the sales) to the rows.
  • Right-click on the parameter and click on the “show parameter”.
  • From the right of your screen, you can select the value (category, ship mode and segment) and your visualization will adjust itself accordingly.

Dynamic measures parameter:

Dynamic measures parameter is similar to dynamic dimensions functionally and in creation as well but this time we’ll be dealing with measures instead of dimensions. Let’s see how to create dynamic measures parameter in Tableau.

  • Create a new sheet and name it.
  • Open a new parameter window from the arrow on the left.
  • Name it and select string as your data type.
  • Select the list option and add the values (profit, quantity and sales).
  • Click ok and this will be added to your parameter section.

After this, we have to create a calculated field.

  • Open the calculation field window from the left-hand side arrow.
  • Give it a suitable name.
  • Write the code given below and click Ok. It’ll appear in your dimension panel.
CASE [Dynamic Measure Parameter ]
WHEN "Sales" THEN [Sales]
WHEN "Profit" THEN [Profit]
WHEN "Quantity" THEN [Quantity]

Our parameter and calculate field both are ready. Let’s execute it now.

  • Drag the calculated field to rows.
  • Bring the category or sub-category to the column.
  • Tableau will create a bar chart for you.
  • Next right-click your parameter and select the “show parameter” option.
  • Now you can see it on the right side of the screen select the value and see the change in your visualization.

How to use dynamic dimension and dynamic measures together?

To use dynamic dimensions and measures in real time you’ll first need to create them individually as we’ve just discussed above. 

  • Drag the calculation field of dynamic measures to rows.
  • Drag the calculation field of dynamic dimensions to columns.
  • A bar chart will appear on the screen.
  • Right-click the dynamic dimensions parameter and select “show parameter” from the drop-down menu. It’ll appear on the right of your screen.
  • Do the same for dynamic measures parameter.
  • Now you can select values from both the parameters and Tableau will make your visualization according to it.
Dynamic measures and dimensions parameter together

Reference line parameter:

To create a reference line parameter open a new sheet and import some data to visualize it. Once you’ve your visualization follow the swallowing steps.

  • Click the arrow on the left and select “create new parameter”.
  • A dialogue box will appear on the screen.
  • Give a name to your parameter.
  • Select the data type according to the data you’ve.
  • Click Ok and the parameter will be visible in the parameters section.

Now let’s create the line.

  • Go the analytics section from the top left corner of your screen.
  • Select the reference line and drag it to select your desired type.
  • A dialogue box will appear.
  • Set the value as the parameter that you’ve created.
  • Now select the colour and design of your line.
  • Click Ok and your reference line will be visible on the screen.
Tableau reference line parameter

To put it in action, right-click the parameter and select” show parameter”. From the right side of your screen, you can change the values of the reference line and it’ll move according to it.

Difference between Tableau parameters and filters:

Parameters are workbook variables like dates, calculated fields or numbers that help you select the way you want your visualization to be by replacing a constant value in the calculation, reference line or filter. On the other hand, filters are used to limit the data available for visualization.

Here is a comparison chart between Tableau parameters and filters.

Tableau Parameters.Tableau Filters.
Increase interactivity.Narrow down and limit the data.
Used for static data.Used for dynamic data.
Can be applied on all or selected worksheets so they’re on the workbook level.Only applicable to the current worksheet. We’ll manually have to apply filters on other worksheets.
Calculated fields are requiredCalculated fields aren’t required
You can’t select multiple valuesYou can select multiple values

In a nutshell:

Tableau parameters are kind of like filters but they work on the level of a workbook. You can select apply them to the entire workbook or you can select specific worksheets as well.

Here are the 5 parameters that we’ve discussed in this article.

  1. Top N parameter
  2. Date field parameter
  3. Dynamic dimension parameter
  4. Dynamic measures parameter
  5. Reference line parameter

We also saw how to use dynamic dimensions and dynamic measures parameters together.

Get our Most Popular Downloads

Download the most popular scenario-based Tableau Workbooks in .twbx format. Used by thousands of Tableau developers and job aspirants every day to improve and fine-tune their CV and Tableau Public profile. Join the largest Tableau Experts Social Group.

Tableau Banking and Financial Dataset Analysis Download
Banking & Financial Dataset Analysis

Financial Domain Tableau Dataset and Analysis. The most important domain in today’s industry. Analyze Key Performance Indicators. Discover Risky and Fraudulent Outliers. Download the Tableau Packaged (.twbx) Workbook. Includes a complete Financial dataset analysis. Enhance your Data Analytics experience with our skilled analysis.

Tableau Healthcare and Hospital Dataset Analysis Download
Healthcare & Hospital Dataset Analysis

Hospital and Healthcare Domain Tableau Dataset and Analysis. A key field of study with millions of lives at stake. The most sensitive industry today. Download the Tableau Packaged (.twbx) Workbook. Understand how healthcare datasets work. Includes a complete Healthcare dataset with analytical charts. Explore Tableau interactive features with this download.

Tableau Insurance Dataset Analysis Download
Insurance Dataset Analysis

Insurance Domain Tableau Dataset and Analysis. Important domain specific metrics and data. Learn how to visualize important metrics. Show outliers and insightful data points. Download the Tableau Packaged (.twbx) Workbook. Includes comprehensive analysis of Insurance data of a large sample population. Uses industry standard analytical practices.

Tableau Practice Test

The best Tableau practice exams built. Period. Explore definitive practical problems created by brilliant Tableau experts.

Get in Touch

Contact Us
Write for Us

Published by Rahul Bhattacharya

Rahul is a journalist with expertise in researching a variety of topics and writing engaging contents. He is also a data analyst and an expert in visualizing business scenarios using data science. Rahul is skilled in a number of programming languages and data analysis tools. When he is not busy writing, Rahul can be found somewhere in the Appalachian trails or in an ethnic restaurant in Chicago.

Leave a Reply