How to Add Parameter Action in Tableau

Cody Schneider••9 min read

Parameter actions in Tableau transform your dashboards from static reports into interactive analytical tools. They let your audience directly influence the data they see by simply clicking on your charts, opening up a world of dynamic sorting, highlighting, and what-if analysis. This guide provides a step-by-step walkthrough for creating and using parameter actions to make your dashboards more engaging and insightful.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

What Are Tableau Parameter Actions?

Before we build one, let's quickly break down the two components: parameters and actions.

  • A Parameter is a dynamic placeholder value that you can use in calculations, filters, or reference lines. Think of it as a variable that you or your end-user can control, like a slider for a sales goal or a dropdown to select a performance metric.
  • An Action is an interaction you define on a dashboard. When a user interacts with a mark (e.g., clicks, hovers, or selects), a corresponding action is triggered, which can filter, highlight, or change a parameter value.

A Parameter Action, therefore, is a special type of dashboard action that allows a user to change a parameter's value by interacting directly with a visualization. Instead of manually using a dropdown or a slider, they can click a bar, a country on a map, or a point on a line graph to feed a new value into your parameter, which then updates an entire dashboard in real-time. This creates a seamless, intuitive experience for anyone exploring your data.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

Why and When to Use Parameter Actions

Parameter actions are incredibly versatile. They are the key to unlocking advanced interactivity without asking your end-users to mess with a bunch of filters and controls. Here are a few common scenarios where they shine:

  • Dynamic Reference Lines: A user clicks on a specific month in a time-series chart, and a vertical reference line instantly appears at that point, allowing them to compare performance before and after that date.
  • Metric Swapping: Instead of creating three separate charts for Sales, Profit, and Quantity, build one chart. Then, create labels or buttons that, when clicked, update a parameter to swap the measure being displayed on the Y-axis.
  • Asymmetrical Drill-Downs: Let users explore different levels of detail in different charts. For example, clicking on a sales region on a map could update a separate bar chart to show the sales breakdown by Sub-Category for only that region, without filtering the rest of the dashboard.
  • "What-If" Scenarios: Allow users to click on predefined buttons like "5% Growth," "10% Growth," or "15% Growth" to update a parameter used in a forecasting calculation. They can immediately see the impact of different assumptions.
  • Dynamic Highlighting: Build a bar chart and a line chart. A user can click a category in the bar chart, and the parameter action will highlight the corresponding line in the other chart, drawing a clear visual connection between the two. This is the scenario we'll build next.

Step-by-Step Guide: Creating a Dynamic Highlighting Action

Let's build a common and very effective dashboard: one that shows total sales by a dimension (Sub-Category) and then highlights that dimension's performance over time when a user clicks on it. We'll use the Sample - Superstore dataset that comes with Tableau.

Step 1: Create the Parameter

First, we need the parameter that will store the user's selection. This parameter will hold the name of the Sub-Category the user clicks on.

  1. In the Data pane on the left, click the small dropdown arrow and select Create Parameter.
  2. Give the parameter a clear name. Let's call it Selected Sub-Category.
  3. Set the Data type to String, since we'll be storing text.
  4. For Allowable values, choose List. This lets us populate the parameter with a predefined list of values.
  5. Click the Add values from button and select Sub-Category. Tableau will automatically pull every sub-category from your dataset into the list.
  6. Click OK. You'll now see your new parameter at the bottom of the Data pane. You can right-click it and select Show Parameter to see a dropdown menu of sub-categories on your worksheet, which confirms it's working. We won't need this control on the final dashboard since our action will control it.

Step 2: Build Your Visualizations

Now, we need the two charts for our dashboard: one for the user to select from, and one that reacts to the selection.

Worksheet 1: Sales by Sub-Category

  1. Create a new worksheet and name it Bar Chart - Sales by Sub-Category.
  2. Drag the Sub-Category dimension to the Columns shelf.
  3. Drag the Sales measure to the Rows shelf.
  4. Sort the chart descending to make it easier to read. You should now have a simple bar chart.

Worksheet 2: Sales Trend Over Time

  1. Create another worksheet and name it Line Chart - Sales Trend.
  2. Drag the Order Date field to the Columns shelf. Right-click it and make sure it is set to the continuous Month (the second MONTH option, with a green calendar icon).
  3. Drag the Sales measure to the Rows shelf.
  4. Here’s the trick: to see the trend for each Sub-Category individually, drag the Sub-Category dimension onto the Detail Mark on the Marks card. Now you’ll see many overlapping lines, one for each sub-category.
GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

Step 3: Connect the Parameter with a Calculated Field

Our 'Line Chart' worksheet needs to know which Sub-Category has been selected via the parameter. We'll create a simple 'True/False' calculated field to handle this.

  1. Navigate to the Line Chart - Sales Trend worksheet.
  2. Click the dropdown arrow in the Data pane and select Create Calculated Field.
  3. Name the field Highlight Selected Sub-Category.
  4. Enter the following simple formula:
[Sub-Category] = [Selected Sub-Category]

This calculation compares the Sub-Category dimension for each mark (each data point on the lines) to the current value of our Selected Sub-Category parameter. It will return True if they match and False if they don't.

  1. Click OK.
  2. Now, drag this new Highlight Selected Sub-Category field onto the Color Mark in the Marks card.
  3. By default, Tableau will color "True" one color and "False" another. Click the Color Mark, then Edit Colors. Assign "True" a bright, noticeable color (like blue or orange) and "False" a light grey. This setup will make the selected sub-category's trend line pop while the others fade into the background.

At this point, you can test it by showing the parameter control (Right-click > Show Parameter on the Selected Sub-Category parameter) and selecting different options from the dropdown. You should see the corresponding line change color in your chart.

Step 4: Build the Dashboard and Configure the Action

With our sheets prepared, it's time to bring them together on a dashboard and add the final magic touch: the parameter action itself.

  1. Create a new dashboard by clicking the New Dashboard icon at the bottom of the Tableau window.
  2. Drag both of your worksheets (Bar Chart - Sales by Sub-Category and Line Chart - Sales Trend) onto the canvas. Arrange them how you see fit, typically with the bar chart on top or to the side.
  3. In the main menu at the top, navigate to Dashboard > Actions...
  4. In the Actions dialog box, click the Add Action button and select Change Parameter...
  5. Now you'll configure the action. This part is crucial, so let's walk through each setting:
  6. Click OK to save the action, and OK again to close the Actions menu.

Step 5: Test Your Interactive Dashboard

Your interactive dashboard is now complete. Click on any bar in the Sales by Sub-Category chart. When you do, two things will happen behind the scenes:

  1. The parameter action will grab the name of the sub-category you clicked on (e.g., "Phones").
  2. It will update the Selected Sub-Category parameter value to "Phones".

Instantly, the highlight calculation in your line chart responds to the new parameter value, and the "Phones" trendline will change color, standing out from the rest. You have successfully created a dynamic, interactive dashboard.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

Best Practices for Using Parameter Actions

Once you've mastered the basics, keep these tips in mind to build even more effective dashboards:

  • Provide User Guidance: Don't make users guess what's interactive. Add a simple text box with instructions like, "Click a bar to highlight its trend over time." Clarity is key to a good user experience.
  • Mind the Clearing the selection Setting: Think carefully about the user journey. "Keep current value" is safe, but sometimes you may want to use "Set value to" an overarching value like "All" when a user deselects. To do so, you would need to adjust your calculated fields to handle the "All" case (e.g., IF [Selected Sub-Category] = 'All' THEN 'Show' ELSEIF...).
  • Combine Actions for Greater Effect: Parameter actions can be used alongside Filter and Highlight actions. For example, a single click could update a parameter to highlight a trend line and filter another chart to show detailed, underlying data for the selection.
  • Keep Performance in Mind: Actions on extremely complex dashboards with millions of data points can sometimes lag. If you notice performance issues, try to optimize your calculations and minimize the number of marks on the 'source' worksheet.

Final Thoughts

Tableau's parameter actions empower you to build analytical tools, not just static reports. By letting users drive the analysis with simple clicks, you invite them to explore, ask new questions, and uncover insights on their own. This guide provides one common use case, but the possibilities for metric switching, 'what-if' modeling, and customized navigation are nearly endless.

Building this level of interactivity can take time, especially when your data is spread across multiple platforms. If you spend your days pulling data from various marketing and sales tools and just need quick, clear answers without the setup overhead, we built Graphed for you. We connect to tools like Google Analytics, Shopify, and Salesforce, allowing you to build real-time, interactive dashboards just by describing what you want to see. Your team can get the insights they need in seconds, not hours.

Related Articles