Chapter 9 of 12

Parameters in Tableau

Learn how to create and use parameters in Tableau to build dynamic, interactive dashboards with what-if analysis and user-driven calculations.

Meritshot15 min read
TableauParametersDynamic CalculationsWhat-If Analysis
All Tableau Chapters

Parameters in Tableau

Parameters are one of the most powerful and flexible features in Tableau. They allow you to inject user-selected values directly into calculations, filters, reference lines, and even dashboard titles — transforming static reports into dynamic, interactive analytical tools.

This chapter covers everything from creating your first parameter to building sophisticated what-if analysis models used in real business environments.


What Are Parameters?

A parameter in Tableau is a workbook variable that replaces a constant value. Instead of hard-coding a number, string, or date into a calculation or filter, you allow the viewer to supply that value at runtime.

How Parameters Differ from Filters

Many beginners confuse parameters with filters. While both allow interaction with the data, they serve fundamentally different purposes.

FeatureFilterParameter
PurposeRestricts which rows of data appearPasses a value into a calculation, filter, or visual element
Works onThe data set (rows)A formula or visual property
Data connectionTied to a field in the data sourceIndependent of any field — it's a workbook variable
Multiple valuesYes (include/exclude multiple values)Only one value at a time (single-select)
Used inFilter shelf, context filtersCalculated fields, reference lines, titles, filters
Visible controlFilter cardParameter control (separate UI element)

Example to illustrate the difference:

A filter on Region = "East" removes all non-East rows from your view. A parameter called [Selected Region] set to "East" does nothing by itself — you must use it inside a calculation such as IF [Region] = [Selected Region] THEN [Sales] END to give it meaning.

This distinction is critical. Parameters give you the flexibility to use the same underlying data in many different ways without touching the data itself.


Creating a Parameter

To create a parameter in Tableau Desktop, right-click anywhere in the Data pane (the left panel showing your fields) and select Create Parameter. Alternatively, go to Analysis → Create Calculated Field, then in the formula bar reference a new parameter.

The Create Parameter dialog has the following fields:

Name

Give your parameter a descriptive name that will be visible to end users. Use names like [Metric Selector], [Top N Products], or [Target Revenue] — avoid cryptic abbreviations.

Data Type

The data type determines what kind of values the parameter can hold.

Data TypeExample ValuesCommon Use Cases
Integer5, 10, 100Top N filtering, year selection
Float0.05, 1.25, 99.9Discount rates, price multipliers
String"Sales", "East", "Blue"Metric selectors, region toggles
BooleanTrue / FalseToggle switches, show/hide logic
Date2024-01-01Date range start/end
Date & Time2024-01-01 08:00:00Timestamp-based filtering

Current Value (Default)

This is the value the parameter holds when a viewer first opens the workbook. Choose a sensible default — typically the most common use case or a middle-ground value.

Allowable Values

This setting controls what values the user can pick.

OptionDescriptionBest For
AllNo restriction — user types any valueFlexible inputs, advanced users
ListPredefined list of valuesMetric selectors, category toggles
RangeMin, max, and step sizeNumeric sliders, date ranges

List option details:

  • You can type values manually or click Add from Field to populate the list from an existing dimension.
  • Each list entry can have a separate Display As label (e.g., value = "SUM_SALES", display = "Total Sales").

Range option details:

  • Set a Minimum and Maximum value.
  • Set a Step Size — how much the value changes each increment (e.g., step 1 for integers, step 0.01 for percentages).
  • Set a Display Format for how the value appears in the control (e.g., currency, percentage).

Showing a Parameter Control

Creating a parameter does nothing visible until you expose it to the user. Right-click the parameter in the Data pane and select Show Parameter Control. This adds a control to your view.

Control Types

Right-click the parameter control header (the small dropdown arrow on the control card) to change the display style:

Control TypeAppearanceBest For
SliderHorizontal drag handleNumeric ranges, smooth adjustment
Type InText input boxFree-form values, exact numbers
Single Value ListRadio buttonsShort lists (<6 items)
Compact ListDropdown menuLists with many items
Multiple Values ListCheckbox list(only for certain custom setups)

Tip: For metric selectors (Sales / Profit / Quantity), use Single Value List — it shows all options at once and is immediately scannable. For Top N (1–20), use Slider — it's more intuitive for numeric ranges.


Using Parameters in Calculations

The most common use of parameters is inside calculated fields. The parameter acts like a variable that your formula can reference.

Example 1: Dynamic Metric Selector

Goal: Let the user switch the primary metric between Sales, Profit, and Quantity without changing the view structure.

Step 1: Create a String parameter named [Metric Selector] with Allowable Values = List:

  • Sales
  • Profit
  • Quantity

Current Value: Sales

Step 2: Create a calculated field named [Selected Metric]:

IF [Metric Selector] = "Sales" THEN [Sales]
ELSEIF [Metric Selector] = "Profit" THEN [Profit]
ELSEIF [Metric Selector] = "Quantity" THEN [Quantity]
END

Step 3: Place [Selected Metric] on the Rows shelf (as a measure). Place [Sub-Category] on Rows or Columns. Show the parameter control. Now the viewer can toggle between metrics and the bar chart updates instantly.

Example 2: Dynamic Date Granularity

Goal: Switch the time axis between Year, Quarter, and Month.

Step 1: Create a String parameter [Date Granularity] with List values: Year, Quarter, Month.

Step 2: Create a calculated field [Dynamic Date]:

IF [Date Granularity] = "Year" THEN DATETRUNC('year', [Order Date])
ELSEIF [Date Granularity] = "Quarter" THEN DATETRUNC('quarter', [Order Date])
ELSEIF [Date Granularity] = "Month" THEN DATETRUNC('month', [Order Date])
END

Step 3: Place [Dynamic Date] as a continuous date on Columns. The timeline now zooms in or out based on user selection.


Parameters in Filters

Parameters can drive dynamic filter conditions through calculated fields placed on the Filter shelf.

Top N by Parameter

Goal: Show only the top N products by sales, where N is user-controlled.

Step 1: Create an Integer parameter [Top N] with Range: Min=1, Max=20, Step=1. Current Value=10.

Step 2: Create a calculated field [Top N Filter]:

RANK(SUM([Sales])) &lt;= [Top N]

Step 3: Place [Top N Filter] on the Filter shelf, edit the filter to show only True. Change the computation to be addressed by Product Name (use Table Calculation settings).

Now dragging the Top N slider from 5 to 15 instantly expands the visible products.

Dynamic Date Range Filter

Goal: Let users set a start date and end date with parameters.

Step 1: Create two Date parameters: [Start Date] and [End Date].

Step 2: Create a calculated field [In Date Range]:

[Order Date] >= [Start Date] AND [Order Date] <= [End Date]

Step 3: Place [In Date Range] on the Filter shelf and filter to True.

Step 4: Show both parameter controls. Users now have a date range picker that filters dynamically.


Parameters in Reference Lines

Reference lines help viewers compare a data point to a target or benchmark. Using a parameter makes that benchmark interactive.

Adding a Parameter-Driven Reference Line

Step 1: Create a Float parameter [Sales Target] with Allowable Values = All. Set current value to 50000.

Step 2: In your view (e.g., a bar chart of Sales by Region), right-click the Sales axis and select Add Reference Line.

Step 3: In the Add Reference Line dialog:

  • Set Line to Value → select [Sales Target]
  • Set Label to Custom: "Target: "
  • Set formatting (dashed line, red color)

Step 4: Show the [Sales Target] parameter control with a Type In input.

Now viewers can type their own target value and immediately see which regions are above or below it. This is extremely common in sales performance dashboards.


Parameters in Titles and Tooltips

Parameters can be embedded in dynamic text using the <Parameters.ParameterName> syntax.

Dynamic Title

Double-click the view title to open the title editor. Type your title and insert the parameter by going to Insert → Parameters → [Metric Selector]. This inserts a placeholder like <Parameters.Metric Selector>.

Example title: Top Products by <Parameters.Metric Selector> — <Parameters.Top N> Shown

When the user switches the metric to "Profit" and sets N to 7, the title automatically reads: Top Products by Profit — 7 Shown

Dynamic Tooltip

Click Tooltip in the Marks card. Insert parameter values alongside field values:

Product: <Product Name>
<Parameters.Metric Selector>: <SUM(Sales)>
Target: <Parameters.Sales Target>

Parameter Actions (Tableau 2019.2+)

Parameter Actions allow a dashboard action (clicking, hovering, or selecting a mark) to set a parameter value — no manual control interaction required.

This enables a completely new paradigm: clicking a bar or data point drives the rest of the dashboard.

How Parameter Actions Work

Go to Dashboard → Actions → Add Action → Change Parameter. Configure:

SettingDescription
Source SheetsWhich sheet triggers the action
Run action onSelect, Hover, or Menu
Target ParameterWhich parameter to update
Source FieldWhich field value gets written into the parameter
Clearing the selectionWhat value the parameter resets to

Step-by-Step: Parameter-Driven Highlight Dashboard

Scenario: A regional sales dashboard where clicking a region name highlights only that region's data across all charts.

Step 1: Create a String parameter [Selected Region] with Allowable Values = List populated from the Region field. Current value = "East".

Step 2: Create a calculated field [Is Selected Region]:

[Region] = [Selected Region]

Step 3: In each sheet on your dashboard, place [Is Selected Region] on the Color shelf. Set True = blue, False = light gray.

Step 4: Create a separate sheet showing just Region names as text marks (a simple list).

Step 5: On the dashboard, go to Dashboard → Actions → Add Action → Change Parameter:

  • Source Sheet: Region List sheet
  • Run action on: Select
  • Target Parameter: [Selected Region]
  • Source Field: Region

Step 6: Now clicking "West" in the region list updates [Selected Region] to "West", which updates the color calculation on every sheet simultaneously — creating a focused, cross-dashboard highlight effect.


What-If Analysis with Parameters

What-if analysis is where parameters truly shine. By letting users manipulate assumptions, you transform a static report into a decision-support tool.

Model 1: Discount Impact Calculator

Business question: If we increase our average discount rate, how does it affect profit?

Step 1: Create a Float parameter [Discount Rate] with Range: Min=0.00, Max=0.50, Step=0.01. Format as percentage. Current value = current average discount.

Step 2: Create a calculated field [Adjusted Profit]:

[Sales] * (1 - [Discount Rate]) - [Cost]

If [Cost] is not in your data, approximate:

[Sales] * (1 - [Discount Rate]) - ([Sales] - [Profit])

Step 3: Create a dual-axis chart with original profit (bars) and adjusted profit (line). The slider lets executives see profitability at any discount rate instantly.

Model 2: Price Elasticity Model

Business question: If we raise prices by X%, how does it affect revenue assuming demand drops proportionally?

Step 1: Create a Float parameter [Price Change %] with Range: -0.30 to 0.30, Step=0.01. Format as percentage.

Step 2: Create a Float parameter [Elasticity] with Range: -3.0 to 0.0, Step=0.1. Current value = -1.2 (typical price elasticity of demand).

Step 3: Create calculated field [Adjusted Revenue]:

[Sales] * (1 + [Price Change %]) * (1 + [Elasticity] * [Price Change %])

Step 4: Plot original vs adjusted revenue on a time series. Users can explore the revenue impact of pricing decisions before committing.

Model 3: Headcount Planning Scenario

Business question: If we hire N additional salespeople at an average quota of Q, what is the expected revenue impact?

Step 1: Integer parameter [New Hires], Range 0–50.

Step 2: Float parameter [Avg Quota Per Rep], Range 0–500000, Step=10000.

Step 3: Calculated field [Projected Revenue Uplift]:

[New Hires] * [Avg Quota Per Rep]

Step 4: Show this as a reference band or text on your revenue forecast chart. Leaders can model the ROI of hiring decisions in seconds.


Parameters vs Sets vs Filters: Decision Guide

ScenarioUse
Show only certain dimension membersFilter
Allow user to pick which members to showFilter with Show Filter control
Compare selected vs all othersSet
Drive a calculation with a user valueParameter
Top N (user-controlled)Parameter + Calculated Field on Filter
Dynamic axis metricParameter + Calculated Field
Target/benchmark lineParameter + Reference Line
Click a mark to update other viewsParameter Action
Fixed cohort comparisonSet
Date range selectionParameters (start & end) or Filter

Decision rule: If the user's selection needs to change a number, formula, or text — use a Parameter. If it needs to show/hide rows — use a Filter. If it needs to compare a selected group to the rest — use a Set.


Practice Exercises

Exercise 1: Metric Toggle Bar Chart

Using the Superstore dataset:

  1. Create a String parameter [KPI Selector] with list values: Sales, Profit, Quantity.
  2. Create a calculated field [Selected KPI] that returns the corresponding measure.
  3. Build a horizontal bar chart of Sub-Category vs [Selected KPI].
  4. Sort bars descending by [Selected KPI].
  5. Add a dynamic title that reflects the selected KPI.

Challenge: Add color to the bars that changes based on whether each sub-category is above or below the average of [Selected KPI].


Exercise 2: Interactive Top N Dashboard

Using the Superstore dataset:

  1. Create an Integer parameter [Top N Products] with Range 1–20.
  2. Create a Rank calculation to filter to the top N products by Sales.
  3. Build a bar chart of Product Name vs Sales showing only the Top N.
  4. Add a reference line at the average Sales of all products (not just the top N — use a fixed value or a separate calculation).

Challenge: Add a second parameter for [Bottom N Products] and create a view that shows both the top N and bottom N simultaneously.


Exercise 3: What-If Profit Scenario

Using the Superstore dataset:

  1. Create a Float parameter [Cost Reduction %] (0% to 30%, step 1%).
  2. Create [Adjusted Profit] = [Profit] + [Sales] * [Cost Reduction %].
  3. Build a dual-axis chart showing original Profit (bars) and Adjusted Profit (line) by month.
  4. Color the line green when Adjusted Profit > Profit, and blue otherwise (this should always be true given the formula, so think about how to test edge cases).

Challenge: Add a text annotation showing the total uplift in profit: [Adjusted Profit] - [Profit] summed across all visible data.


Exercise 4: Parameter Action Click-Through

Using the Superstore dataset:

  1. Create a String parameter [Selected Sub-Category].
  2. Create a calculated field [Is Selected] = [Sub-Category] = [Selected Sub-Category].
  3. Build a scatter plot of Sales vs Profit colored by [Is Selected].
  4. Build a bar chart of Category vs Sales also colored by [Is Selected].
  5. Assemble both onto a dashboard.
  6. Create a Parameter Action: clicking a bar in the bar chart sets [Selected Sub-Category] to the clicked sub-category.
  7. Test: clicking "Chairs" in the bar chart should highlight Chair marks in the scatter plot.

Summary

Parameters are Tableau's most versatile interactive element. Unlike filters that restrict data, parameters inject a user-controlled value into calculations, filters, reference lines, and text.

Key takeaways from this chapter:

  • Parameters have a data type, a default value, and allowable values (All, List, or Range).
  • You must show the parameter control for users to interact with it, and you can style it as a slider, dropdown, list, or text box.
  • Parameters become powerful when connected to calculated fields — this is what makes metric selectors, dynamic axes, and scenario models work.
  • In filters, parameters drive Top N analysis and dynamic date ranges.
  • In reference lines, parameters create adjustable benchmark lines.
  • In titles and tooltips, the &lt;Parameters.Name&gt; syntax makes text dynamically responsive.
  • Parameter Actions (Tableau 2019.2+) allow clicking a mark to set a parameter — enabling cross-sheet highlighting and drill-down experiences.
  • What-if analysis models (discount impact, price elasticity, headcount planning) are built by connecting parameters to calculated fields that model business scenarios.

Master parameters and you gain the ability to build truly adaptive, self-service analytical tools that empower business users to answer their own questions.