What is a Parameters?
- A Parameter is a dynamic value that allows users to change data, calculations, filters, or charts interactively.
Why Use Parameters?
Change calculations dynamically.
Create interactive dashboards.
Switch between charts.
Filter data.
Change measures (Sales, Profit, Quantity).
Example: Parameter for Sales and Profit
Suppose you have two measures:
Sales
Profit
Using a parameter, users can switch between:
Sales
or
Profit
How to Create a Parameter
Step 1: Open Tableau
- Open Tableau and connect your dataset.
Step 2: Go to Data Pane
- On the left side, right-click anywhere in the Data Pane.
Click:
Create Parameter
Step 3: Enter Parameter Details
Example:
Property Value
Name Select Measure
Data Type String
Allowable Values List
Step 4: Add Values
Add values:
Sales
Profit
Quantity
Click OK.
Step 5: Show Parameter
Right-click the parameter.
Click:
Show Parameter
You will see:
Sales
Profit
Quantity
Create Calculated Field for Parameter
Go to:
Analysis → Create Calculated Field
Name:
Selected Measure
Formula:
CASE [Select Measure]
WHEN "Sales" THEN SUM([Sales])
WHEN "Profit" THEN SUM([Profit])
WHEN "Quantity" THEN SUM([Quantity])
END
Click OK.
Step 6: Use in Chart
Drag:
Category → Rows
Selected Measure → Columns
Now users can switch:
Sales
Profit
Quantity
The chart changes automatically.
Parameter Flow
Create Parameter
↓
Add Values
↓
Show Parameter
↓
Create Calculated Field
↓
Use in Chart
↓
Interactive Dashboard
Top comments (0)