Tableau Parameters

Parameters are user-controlled variables. A viewer types or selects a value from a dropdown, and charts update based on that input. Parameters replace hardcoded values in calculations, filters, and reference lines with dynamic viewer-chosen values — making a single dashboard do the work of many.

What Makes Parameters Different from Filters

Filters remove data from the view. Parameters change how calculations work. A filter showing only "East" region removes West, South, and Central. A parameter for "Target Sales Value" changes the reference line on a chart — no data is removed, but the chart responds to the viewer's input.

Analogy: Thermostat vs Light Switch

Filter = Light switch
  On: all data visible
  Off: specific data hidden
  Binary, category-based

Parameter = Thermostat
  You set any value (65°, 70°, 72°...)
  The system responds to your chosen number
  Continuous, input-based

Creating a Parameter

  1. Right-click in the Data Pane (blank space) → Create Parameter
  2. Give it a name (e.g., "Sales Target")
  3. Choose a Data Type: Integer, Float, String, Boolean, or Date
  4. Set the Allowable Values: All (free text), List (dropdown), or Range (slider)
  5. Set a current value (the starting default)
  6. Click OK

Diagram: Parameter Creation Choices

Data Type:    Integer | Float | String | Boolean | Date
               |         |        |          |        |
Allowable:   All values (free input)
             List: Option1, Option2, Option3 (dropdown)
             Range: Min → Max with Step size (slider)

Example — "Top N" Parameter:
  Data Type: Integer
  Allowable: Range
  Min: 1 | Max: 50 | Step: 1
  Default: 10
  → Viewer drags slider to choose Top 5, Top 10, Top 20, etc.

Showing a Parameter Control

A parameter does nothing until you connect it to a calculation or reference line, and show its control to the viewer. Right-click the Parameter in the Data Pane and select "Show Parameter Control." A control appears on the right side of the view — a text box, dropdown, or slider depending on the parameter type.

Using a Parameter in a Calculated Field

Parameters become useful when referenced inside calculated fields. Replace any hardcoded number with the parameter name.

Example: Dynamic Profit Classification

Without Parameter (hardcoded):
IF [Profit] > 500 THEN "High" ELSE "Low" END
→ Always uses $500 as the threshold. Fixed forever.

With Parameter (dynamic):
IF [Profit] > [Profit Threshold] THEN "High" ELSE "Low" END
→ Viewer sets the threshold using the parameter control
→ Change to $200 → chart shows more "High" products
→ Change to $1000 → chart shows fewer "High" products

Top N Filter with Parameter

One of the most popular parameter uses is a dynamic Top N filter. The viewer chooses how many top items to display.

Step-by-Step: Dynamic Top N

  1. Create an Integer parameter "Top N" with Range 1–50, default 10
  2. Create a Calculated Field: RANK(SUM([Sales])) <= [Top N]
  3. Drag this Calculated Field to the Filters shelf
  4. Select "True" in the filter dialog
  5. Show the Top N parameter control
  6. Viewer changes the number → chart shows that many top products

Parameter as a Reference Line Value

Drag "Reference Line" from the Analytics Pane onto your chart. Set the value to your Parameter instead of a fixed number or average. The reference line moves as the viewer changes the parameter. Use this for sales targets, budget lines, or any threshold that different viewers may want to set differently.

Diagram: Moving Reference Line

SUM(Sales)
     ^
 1400|        [====]
     |
 1000|--- -- -- -- -- -- -- (Target: $1,000 — parameter set by viewer)
     |
  800| [====]
  600|                [====]
     +--------------------------------------------> Category
     Furniture   Office Supplies  Technology

Viewer changes parameter to $1,200:
 1200|--- -- -- -- -- -- -- (new target line)

Bars above the line = above target
Bars below the line = below target

Parameter for Metric Switching

Use a String parameter to let viewers switch between measures without creating separate charts.

Example: Switch Between Sales, Profit, and Quantity

Parameter "Metric" — String — List:
  Option 1: "Sales"
  Option 2: "Profit"
  Option 3: "Quantity"

Calculated Field "Selected Metric":
CASE [Metric]
  WHEN "Sales"    THEN [Sales]
  WHEN "Profit"   THEN [Profit]
  WHEN "Quantity" THEN [Quantity]
END

Drag "Selected Metric" to Rows.
Viewer selects from dropdown → chart switches measures instantly.
One chart handles all three metrics.

Date Range Parameter

Create two Date parameters — "Start Date" and "End Date." Use them in a calculated field filter: [Order Date] >= [Start Date] AND [Order Date] <= [End Date]. Show both parameter controls. The viewer picks any custom date range and the entire dashboard updates — far more flexible than a fixed date filter.

Summary

Parameters let viewers control the values your charts use — thresholds, top N counts, date ranges, or which metric to display. Create a parameter in the Data Pane, connect it to a calculated field or reference line, and show the parameter control so viewers can interact with it. Parameters replace filters when you need continuous input rather than category selection, and they eliminate the need for multiple redundant charts by making a single chart respond to viewer-defined variables.

Leave a Comment

Your email address will not be published. Required fields are marked *