How to Use Ask Data in Tableau Desktop

Cody Schneider••9 min read

Tableau's 'Ask Data' feature lets you have a conversation with your data, turning simple questions into powerful visualizations without touching a single drag-and-drop tool. This guide will walk you through exactly what Ask Data is, how to set it up in Tableau Desktop, and the best ways to use it for quick, insightful analysis. We’ll cover everything from publishing your data to crafting the perfect questions to get the answers you need.

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 Exactly is 'Ask Data' in Tableau?

Think of Ask Data as a search bar for your database. Instead of dragging pills for 'Sales' and 'Region' onto your canvas to build a map, you simply type, "show me sales by region." Tableau interprets your question, queries the data source, and automatically generates the best visualization to represent that information — in this case, a geographic map.

It's built on a technology called natural language processing (NLP), which bridges the gap between human language and computer instructions. This feature is designed for anyone who needs quick answers from data but doesn't have the time or technical expertise to build a report from scratch. It empowers marketers, sales managers, and other business stakeholders to perform their own initial analysis, freeing up data analysts to focus on more complex, deep-dive projects.

The magic behind it lies in what Tableau calls a "semantic model." When you enable Ask Data on a data source, Tableau analyzes your fields (dimensions, measures) and builds an index that understands their relationships and potential uses. This model is what allows it to correctly translate "biggest customers last quarter" into a sorted bar chart of customer names by sales volume for the previous three months.

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.

Step-by-Step Guide: Setting Up Ask Data

Before you can start posing questions, you need to prepare and publish your data source. Ask Data doesn't work directly on a local workbook, it requires a data source published to Tableau Server or Tableau Online. From there, you create a "Lens" to serve as the curated version of your data for anyone using the feature.

Step 1: Prepare and Publish Your Data Source

First, connect to your data in Tableau Desktop just like you normally would. Clean up any messy fields, create your calculated fields, and build the relationships or joins necessary for your analysis.

  • Open your workbook in Tableau Desktop and go to the Data Source tab.
  • Ensure all your data types are correct (e.g., geographic roles are assigned to Country/State, numbers are numeric, etc.).
  • Once your data is ready, go to any sheet, right-click the data source in the Data pane, and select Publish to Server.
  • Sign into your Tableau Server or Tableau Online account when prompted.
  • In the publishing dialog, give your data source a descriptive name. This is the name people will see, so make it clear. Leave the other settings as default for now and click Publish.

Your data is now live and accessible to others in your organization, and more importantly, it's ready for Ask Data.

Step 2: Create a Lens for Ask Data

A "Lens" is a curated version of your published data source that's specifically optimized for natural language queries. Creating a Lens allows you to refine the data source without changing the original published version. You can create multiple Lenses from a single data source, each tailored to a different team or purpose (e.g., a "Marketing Lens" and a "Sales Lens").

  • Navigate to your published data source on Tableau Server or Tableau Online.
  • Go to the Ask Data tab.
  • Click the New Lens button.
  • Give your Lens a clear, intuitive name that reflects its purpose, like "Marketing Campaign Performance" or "Quarterly Sales Overview." Add a description so users know what kind of questions it's designed to answer. Save the Lens.
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: Curate the Fields in Your Lens

This is the most critical step for making Ask Data genuinely useful. Curating the Lens involves tailoring the data fields to match the language your team actually uses. Poorly named or ambiguous fields will lead to confusing results, so investing time here pays off significantly.

In the Lens editing interface, you'll see a list of all fields from your data source. Here's what you should do:

  • Hide Unnecessary Fields: Have any duplicate fields, convoluted IDs, or backend columns that users don't need? Hide them. Just click the "eye" icon next to the field name to exclude it from Ask Data queries. This reduces clutter and prevents confusion.
  • Rename Fields for Clarity: Business users won't search for "Cust_LName" or "Sum_Txn_Value." Use the pencil icon to rename fields to plain English, like "Customer Last Name" and "Revenue."
  • Add Synonyms: Think about all the different ways your team might refer to a single concept. For a field named "Revenue," you might add synonyms like "Sales," "Money," and "Turnover." For "Customer ID," you could add "Client Number." Click into a field to add comma-separated synonyms. Tableau will then recognize any of these terms in user queries.
  • Set Defaults: Review the default aggregation for your numeric fields. Tableau usually guesses correctly (e.g., SUM for Sales), but you might want to change Profit Ratio to AVG by default.

Once you've curated your Lens, save it. It’s now ready to be used by you and your team.

Using Ask Data to Explore and Visualize

With a well-curated Lens, asking questions is straightforward and intuitive. Let’s start simple and build up to more complex queries.

Asking Your First Questions

Open the Lens you created. You’ll be greeted with a search bar and a list of available data fields on the left. Simply start typing your question into the bar.

Here are a few examples, from basic to more specific:

  • For a single number (KPI): "total sales" or "how many orders did we get" or "average profit ratio"
  • Adding a category (Dimension): "sales by category" or "profit by state"
  • Adding a time component: "monthly sales" or "weekly profit over the last year"
  • Applying a filter: "sales in texas" or "orders for the Technology category last month"

As you type, Tableau will offer suggestions based on recognized fields, helping guide your query. When you press Enter, it instantly generates a visualization. "Sales by category" becomes a bar chart, while "profit by state" becomes a map.

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.

Refining Your Query and Visualization

Often, your first question leads to another. The Ask Data interface is designed for this kind of iterative exploration.

  • Change the Visualization Type: Tableau picks what it thinks is the best chart, but you might want something else. If it generates a bar chart, you can use the dropdown menu on the right to change it to a table, treemap, or another compatible chart type.
  • Add Fields Visually: Don't want to type everything? After asking an initial question like "show me sales," you can click on a field like "Region" from the left-hand panel, and Ask Data will automatically add it to your query and update the viz ("sales by region").
  • Drill Down with Follow-up Questions: You don't have to start from scratch. If your chart shows "sales by category," you can simply refine your query by adding "in California" to the end and hitting Enter. It will update the existing visualization with the new filter.
  • Save Your Work: Find a particularly useful visualization? Click the Save button in the top-right corner to save it as a new worksheet in a Tableau workbook. From there, you can place it onto a dashboard for regular reporting.

Best Practices for Getting the Best Results

To make Ask Data a successful tool for everyone, follow these tips — both for those setting it up and those using it.

For Data Curators (Authors & Admins)

  1. Think Like Your User: When renaming fields and adding synonyms, put yourself in the shoes of someone in marketing or sales. What terms do they use in meetings? Use that language.
  2. Create Purpose-Built Lenses: Avoid creating one giant Lens for the whole company. Build smaller, focused Lenses for different teams. A finance team needs to see different fields than a product team.
  3. Regularly Review User Queries: In the Lens usage analytics, you can see what kinds of questions people are asking. Use this to identify missing synonyms or commonly used fields that need better descriptions.
  4. Document and Train: Let your team know which Lenses are available and what kind of data they contain. A simple one-page guide with example questions can dramatically improve adoption.

For Business Users (Viewers)

  1. Start Simple: Begin with broad questions like "total profit" and then gradually add more detail, such as "...by ship mode" or "...last quarter."
  2. Be Specific Where Possible: Vague questions can produce unexpected results. "Top customers" might work, but "top 10 customers by sales" is clearer and more likely to give you the exact answer.
  3. Leverage the Suggestions: As you type, pay attention to the auto-complete suggestions. Using these ensures you're referencing fields that exist in the data model.
  4. Rephrase Your Question: If you don't get what you expect, try asking the question a different way. "Sales in 2023" and "sales by month for 2023" might give you different views of the same data. Experimentation is part of the process.

Final Thoughts

Tableau's Ask Data is a fantastic feature for lowering the barrier to data analysis, allowing anyone to explore data and get quick answers without technical training. Its success hinges on a well-prepared data source and curated Lens, which transforms raw data fields into a business-friendly vocabulary for anyone to use.

This industry shift towards natural language interaction is making data analytics more intuitive and conversational. At Graphed, we've built our entire platform around this idea. We remove the setup friction by connecting directly to your various marketing and sales platforms — like Google Analytics, Shopify, and Salesforce — and let you create entire dashboards using simple prompts. There’s no need to publish data sources or meticulously curate synonyms, just ask what you want to see, and we build the real-time dashboard for you instantly.

Related Articles