What Are Parameters in Tableau and How to Implement Them

Parameters in Tableau enable users to add some advanced calculations and calculated fields. Parameters provide adding a non-existing variable to the entire work and simplify the needs and requirements to analyze and visualize the data.

What are the Parameters in Tableau?

The parameters in Tableau are the workbook variables like a number, date, or calculated field that allows users to replace a constant value in a calculation, filter, or reference line.

For example, the user can create a new calculated field that returns True if the aggregate of total marks is greater than 90% and returns False if it is less than 90%. Users can replace the constant value of "90%" in the formula with the parameters in Tableau as per the requirements. With the parameter control, users can dynamically vary the threshold values in their calculation.

Hope you got a basic idea of parameters in Tableau. Let us move ahead and understand how parameters in Tableau are created.

Become a Data Scientist with Hands-on Training!

Data Scientist Master’s ProgramExplore Program
Become a Data Scientist with Hands-on Training!

How to Create Parameters in Tableau?

There are multiple possibilities of creating the Parameters in Tableau based on the user's requirements. In this practical section, you will see the most commonly used Parameters. Here, this tutorial will use the Sample Superstore Dataset available in Tableau Public.

  • Top N Parameters in Tableau
  • Date Field Parameters in Tableau
  • Dynamic Measures
  • Dynamic Dimensions

Top N Parameters in Tableau

The following are the steps to create Top N Parameters in Tableau.

  • In this Parameters demo, you will find the Top N Sub-Categories giving maximum sales.
  • Start Tableau and import the sample superstore dataset.
  • Please create a new sheet and rename it as Top N Parameters, for your reference.
  • Now, select sales from the measures tab and drag it to rows.
  • Select sub-category from dimensions and drag it to columns.
  • Tableau will automatically generate a bar chart as shown below.

Top-N-Parameters-image-1

  • The orientation can be changed if necessary.
  • The next step is to organize the chart in descending order of the sum of sales.

Top-N-Parameters-image-2

  • To find the Top N Sub-Categories giving the maximum sales, drag the sub-category pill from dimensions onto the filter in the marks-sheet.

Top-N-Parameters-image-3

  • A new "filter" dialogue box will pop-up on the screen.
  • Select the top option in the menu bar.

Top-N-Parameters-image-4

  • Select the field option
  • Select the new parameter option

Top-N-Parameters-image-5

  • Rename the parameter
  • Select the list option
  • Write in the values and type in the text into the "display as" option.

Top-N-Parameters-image-6

  • Make sure the aggregation is SUM.
  • Select the OK option. 

Top-N-Parameters-image-7

  • Under the measures template, you can find the newly created parameter.
  • Select the newly created parameter and right-click the pill. 
  • Select the show parameter option and select the top 10 option.

Top-N-Parameters-image-8

  • The Tableau will provide the Top N Parameter list on the screen.

Top-N-Parameters-image-9

  • Select Top 10 and Tableau will present the output.

Top-N-Parameters-image-10

With that, you have seen how to create Top N Parameters in Tableau. Next, this tutorial will look into the Date Parameters in Tableau.

Become a Data Scientist with Hands-on Training!

Data Scientist Master’s ProgramExplore Program
Become a Data Scientist with Hands-on Training!

Date Field Parameters in Tableau

In the date parameters, you will find out the sales according to the dates. It could be in terms of a year, quarter, month, week, or day. The "Parameter options" will be available in the parameter.

Now, the following steps are needed to be followed to create a date parameter.

  • Please create a new sheet and rename it as Date Parameter.
  • Drag order date to rows and sales to the tt table as shown below.

date-parameter-image-1

  • The resultant text table will as follows.

date-parameter-image-2

  • To create a new parameter, select the arrow icon in the top left corner and select the create parameter option as shown below.

date-parameter-image-3

  • The new parameter dialogue box will appear on the screen. 
  • Rename the parameter as date parameters
  • Select the datatype as string.
  • Select the list option
  • Add the values and "display as" details and select OK as shown below.

date-parameter-image-4

According to the year, quarter, month, week, and day, you need a new calculated field to display the sales.

  • Create a new calculated field named date calculation.
  • Go to the arrow icon option in the top left corner.
  • Select the arrow icon and click on the "create a calculated field" option, as shown below.

/date-parameter-image-5

  • A new window will appear on your screen. Here you can add your queries, as shown below.
  • Write the following query in the date calculation window and select OK as shown below.

//Code

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]))

END

date-parameter-image-6

  • Now, you have the date parameter in the parameters section and date calculation in the dimensions section.
  • Next, change the text table to a bar graph. Select the ‘Show me’ tab and choose the option of a bar graph in the list.

date-parameter-image-7

  • The text table will not get converted into a bar graph. 
  • Select the marks sheet's label option to give you the details related to sales in a readable format.

date-parameter-image-8

To visualize the sales in terms of the year, quarter, month, week, or day, you need to use the Date Parameters. Select the Date Parameters option from the parameters panel and right-click the pill, and select the show parameter option as shown below.

date-parameter-image-9.

  • The parameters option will be shown as follows.

date-parameter-image-10

Moving on, select the month option, and Tableau will provide you with sales information per month.

date-parameter-image-11

Advancing, we will look into Dynamic measures and Dynamic Dimensions.

Dynamic Dimensions 

To create the Dynamic Dimensions parameter, you need to execute the following steps.

  • Please create a new sheet and rename it as Dynamic Dimensions.
  • Create a new parameter. Select the arrow icon and click on the new parameter option.

dynamic-dimension-parameter-image-1.

  • Now, rename the parameter as Dynamic Dimension Parameter.
  • Select the datatype as a string.
  • Select category, ship-mode, and segment dimensions from the dimensions panel.

dynamic-dimension-parameter-image-2

  • Select the OK option and now, create a new calculated field.
  • Hover over to the arrow icon and select "create a calculated field."

dynamic-dimension-parameter-image-3

  • Write the following code in the calculated field window and select OK as shown below.

CASE [Dynamic Dimension]

WHEN "Category" THEN [Category]

WHEN "Ship Mode" THEN [Ship Mode]

WHEN "Segment" THEN [Segment]

END

dynamic-dimension-parameter-image-4

  • Now, you can find the newly created dynamic dimension parameter and dynamic dimension calculated fields in the left panel.
  • Drag the Dynamic Calculation field from dimensions panel to columns
  • Drag category to columns
  • Drag sales to rows

dynamic-dimension-parameter-image-5

  • Now right click on the Dynamic Dimensions parameter pill and select the show parameter option.

dynamic-dimension-parameter-image-6

Now, take a look at the Parameter menu. The output is now capable of visualizing dynamic dimension data based on dimensions like Category, Ship-mode, and Segment, as shown in the following output image.

dynamic-dimension-parameter-image-7

dynamic-dimension-parameter-image-8

Up next, it’s time to learn about Dynamic Measures.

Become a Data Scientist with Hands-on Training!

Data Scientist Master’s ProgramExplore Program
Become a Data Scientist with Hands-on Training!

Dynamic Measures

Now, Dynamic Measures are completely similar to Dynamic Dimensions, with only one difference. Instead of Dimension values, we use Measure values.

To create a Dynamic Measures Parameter, you need to follow the steps as explained below.

  • Please create a new sheet and rename it as Dynamic Measures Parameter for reference.
  • Create a new parameter. Select the arrow icon click on the new parameter option.

dynamic-Measures-parameter-image-1

  • Next up, rename the parameter as Dynamic measures parameter.
  • Select the data type as a string.
  • Moving on, select the list option and write the sales, profit, and quantity values as shown below.

dynamic-Measures-parameter-image-2

  • Now you will find a newly created pill in the parameters panel.
  • The next step is to create a new calculated field.
  • Select the arrow icon, click on the create new calculated field option.

dynamic-Measures-parameter-image-3

  • A new calculated field window will appear on the screen.
  • Type the following formula and select OK to create a new calculated field.

CASE [Dynamic Measure Parameter ]

WHEN "Sales" THEN [Sales]

WHEN "Profit" THEN [Profit]

WHEN "Quantity" THEN [Quantity]

END

dynamic-Measures-parameter-image-4

  • Now, you can find a newly created calculated field in the measures panel.
  • Drag the newly created calculated field in the measures panel to rows.
  • Drag category from dimensions to columns.
  • Tableau will automatically generate a bar chart.

dynamic-Measures-parameter-image-5

  • Now right-click on the newly created parameter and select the show parameter option.

dynamic-Measures-parameter-image-6

dynamic-Measures-parameter-image-7

  • Now, select the label icon from the marks card and tick the label box.

dynamic-Measures-parameter-image-8

  • The final result will look as follows.

dynamic-Measures-parameter-image-9.

In the next section, this tutorial will explore some of the important differences between parameters and filters.

Become a Data Scientist with Hands-on Training!

Data Scientist Master’s ProgramExplore Program
Become a Data Scientist with Hands-on Training!

Parameters in Tableau vs. Filters in Tableau

Tableau Parameters

Tableau Filters

Parameters are preferred for Static Data

Filters are used for Dynamic Data

Parameters are implemented to the entire workbook

Filters can be implemented to specific sheets only

Multiple values cannot be selected while implementing Parameters

Multiple values can be selected while implementing Filters

Parameters are implemented using Calculated fields

Filters do not use calculated fields

Parameters support multiple datatypes

Fields cannot support multiple datatypes

With that, you have reached the end of this tutorial titled "What Are Parameters in Tableau and How to Implement Them?".

Master data visualization, business intelligence tool and advance your career in analytics with the Tableau Certification Training Course. Enroll now.

Next Steps

LOD Expressions in Tableau can be your next stop. LOD Expressions in Tableau will help you explore the smallest granularities in your data and apply them to the entire workbook.

To move forward, the link to your next stage is here, LOD Expressions in Tableau.

Want to improve your skillset and gain better knowledge on Tableau to become certified as a Tableau Professional? Then explore Simplilearn's Tableau training and certification website. The program is designed by Experts and delivered by practitioners; Simplilearn’s Tableau program could help you move forward in your career. 

If you have any questions about the topics in this tutorial, please leave them in the comments section at the end of this page, and our team of experts will answer them for you at the earliest!

About the Author

Ravikiran A SRavikiran A S

Ravikiran A S works with Simplilearn as a Research Analyst. He an enthusiastic geek always in the hunt to learn the latest technologies. He is proficient with Java Programming Language, Big Data, and powerful Big Data Frameworks like Apache Hadoop and Apache Spark.

View More
  • Disclaimer
  • PMP, PMI, PMBOK, CAPM, PgMP, PfMP, ACP, PBA, RMP, SP, and OPM3 are registered marks of the Project Management Institute, Inc.