How to Create Prompts in Tableau

Cody Schneider5 min read

Creating interactive prompts in Tableau is one of the best ways to transform a static report into a dynamic and exploratory dashboard. What many users call "prompts" are known as "Parameters" in Tableau, and they are incredibly powerful. This guide will walk you through exactly how to create and use parameters to make your dashboards more engaging and user-friendly.

GraphedGraphed

Your AI Data Analyst to Create Live Dashboards

Connect your data sources and let AI build beautiful, real-time dashboards for you in seconds.

Watch Graphed demo video

What Are "Prompts" in Tableau? (Hint: They're Called Parameters)

If you're asking how to create a "prompt" in Tableau, you're almost certainly looking for Parameters. A parameter is a workbook variable, like a number, date, or a string of text, that can be used to replace constant values in calculations, filters, and even reference lines. In simpler terms, a parameter lets you or your end-users change a value on-the-fly to see how it affects the data in the view. You are essentially giving the controls to the dashboard’s viewer.

For example, imagine you have a bar chart showing sales for every country. Without parameters, if you wanted to also see a view focused just on the United States, you'd have to create a separate filtered view. With a parameter, however, you can create a single list or drop-down menu that lets the user select "United States," "Canada," or "Mexico" and have the original chart instantly update or highlight the chosen country. It keeps your dashboards clean, intuitive, and much more powerful.

Why Should You Use Parameters?

Going beyond basic filters, parameters give your dashboard a professional, app-like feel. They're the key to unlocking a higher level of user engagement and analysis. Here’s why they’re so valuable:

  • Perform "What-If" Analysis: Parameters are perfect for scenario planning. You can create a parameter that lets a user input a hypothetical sales increase (say, 5%, 10%, or 20%) and then create calculations that show what the projected revenue or profit would be based on that input. This is invaluable and often underutilized.
  • Create Top N and Bottom N Filters: A standard filter might be able to find your top 10 products, but what if a user wants to see their top 5, top 12, or top 50? By building a ‘top N’ parameter, you can provide an input box where users can type in any number of rankings and watch the view instantly adapt.
  • Dynamic Sorting and Highlighting: Allow users to organize a data visualization's order themselves based on their parameters in a calculated field so they can organize the view as they see fit. You can let them highlight specific categories, such as a single customer, product, or sales region on a chart with a variety of data, for deeper exploration.
  • Simplify the User Experience: Instead of presenting users with a complex panel of filters, you can use a few key parameters to guide their analysis in a much more intuitive way. A single parameter can control multiple worksheets on a dashboard at once, which provides a unified, seamless, and less convoluted experience.

Free PDF Guide

AI for Data Analysis Crash Course

Learn how to get AI to do data analysis for you — the best tools, prompts, and workflows to go from raw data to insights without writing a single line of code.

Step-by-Step Guide: How to Create Your First Parameter

Thinking about how Parameters are powerful is one thing, but building them is another. The best way to learn is by doing. We will use the common sample "Superstore Dataset" provided in a new Tableau installation as our datasource. Even if you do not have it, creating your own similar view in any given dataset is fairly straightforward. We will make sure this section has plenty of step-by-step points so you won’t have many questions about completing the task.

The Scenario: Highlighting a Specific Sales Region

Our goal is to create a bar chart showing sales for all Customer Segments. We'll then build a parameter that lets a user select a specific Segment from a dropdown list to highlight it in a different color on the chart. Let's get started:

  1. Part 1: Building a Foundational Visualization Let’s start setting up our data visualization before tackling any work with the parameters themselves. Setting up our bar chart first with its desired measures is of the greatest importance as to know where we want to connect our parameter with on our view.
  2. Part 2: Creating the Parameter Itself With our chart displaying “Sum of Sales” by Segments, it's time to create the parameter that will act as our user prompt.
  3. Part 3: Make the Parameter Visible Parameters need to be enabled visually. Find the parameter you just created in the Data pane, right-click on it and select "Show Parameter". You should now see a dropdown control with the list of customer segments.
GraphedGraphed

Your AI Data Analyst to Create Live Dashboards

Connect your data sources and let AI build beautiful, real-time dashboards for you in seconds.

Watch Graphed demo video

Linking Parameters and Visual Parts

This is where it all comes together. A parameter needs to be linked with a calculated field to make it functional within your dashboard.

  • Create a Calculated Field: Go to the menu labeled Analysis and select "Create Calculated Field…".
  • Name the Calculation: Choose a descriptive name like "CustomerSegment=?".
  • Write the Formula: Enter the following formula: [CustomerSegment] = [Select a CustomerSegment] This formula returns "True" if the selected customer segment matches, or "False" if it doesn't.
  • Finalize the Calculated Field: Press 'OK' to save the field, which can now be found in the data pane.
  • Integrate the Parameter: Drag the new calculated field into the ‘Color’ property of the 'Marks' card in your visualization.
  • Adjust Colors for Better UX: Change the “FALSE” highlight color to a subdued tone for less emphasis.

Final Thoughts

Parameters are your gateway to transforming standard Tableau reports from informational tools into truly interactive analytical dashboards without the complexity found in other software solutions today. They unlock "what-if" scenarios, create flexible filters like “top-n,” and enhance user experience - a feature your coworkers or clientele will very much appreciate.

Creating these interactive dashboards from live marketing and business platforms is further simplified within Graphed. Graphed streamlines the entire process, allowing for easy dashboard creation without the need for complex syntax. For those seeking a quicker solution, try our tool for free by visiting Graphed!

Related Articles