How to Make a Graph in Tableau with AI
Building graphs in Tableau used to mean dragging and dropping pills, learning about dimensions versus measures, and navigating complex settings menus. Now, you can build them just by asking. This article will show you how to use Tableau's AI features, like Ask Data and Tableau Copilot, to create visualizations using simple, everyday language.
What Are Tableau's AI Features?
Tableau's built-in AI tools are designed to lower the barrier to data analysis. They act as an intelligent assistant that understands your plain-English questions and translates them into fully-formed charts and graphs. Instead of manually building a visualization from scratch, you describe what you want to see, and Tableau does the heavy lifting for you. There are two primary features that accomplish this:
- Ask Data: Think of Ask Data as a powerful search bar for your data. You type in a query like, "what were our sales by region last quarter?" and it instantly generates a map or bar chart to answer you. It's fantastic for quick, ad-hoc analysis and exploration.
- Tableau Copilot: This is a more recent and more powerful generative AI assistant. It functions like a conversational partner. You can have a back-and-forth dialogue to not only create charts but also to suggest calculations, build formulas, and even help you design entire dashboards. It's an accelerator for both beginners and seasoned pros.
Using these tools helps you move from data to insight much faster. It's less about remembering how to build a specific chart type and more about knowing what questions to ask of your data.
First, Prepare Your Data
Before you can start asking questions, you need to make sure Tableau's AI can understand your data's context. Your AI assistant is only as smart as the data you give it. A few minutes of prep can make a world of difference in the accuracy and relevance of the graphs it produces.
1. Connect to Your Data Source
You’ll first need to connect Tableau to your data, whether it's an Excel file, a Google Sheet, a CSV, or a SQL database. Once connected, Tableau prompts you to drag the tables you want to analyze onto the canvas. This is where you can define relationships between different tables (e.g., connecting a table of sales transactions to a table of customer details using a 'Customer ID' field).
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.
2. Check and Correct Data Types
The AI needs to know if a column of numbers represents sales revenue, zip codes, or ID numbers. Tableau is usually good at guessing data types upon import, but it’s always wise to double-check.
- Look at the icons next to each field name. Are geographic fields marked with a globe icon? Are dates marked with a calendar? Are numbers marked with a '#'?
- If something is incorrect, simply click the icon and select the correct data type from the dropdown menu (e.g., changing a numerical ‘Zip Code’ field from a Number (whole) to a String with a Geographic Role of 'Zipcode/Postcode').
3. Rename Fields for Clarity
This is arguably the most important step for using natural language features. Field names that make sense to a database administrator, like 'txn_amt' or 'prod_cat_desc', are confusing for both you and the AI. If you want to ask, "Show me sales by product category," you’ll get much better results if your fields are actually named 'Sales' and 'Product Category'. Take a moment to rename cryptic column headers to something anyone can understand. To rename a field, just right-click it and choose 'Rename'.
cust_fname→Customer First Namerev_q4→Q4 Revenueorder_dt→Order Date
Creating a Graph with Ask Data: Step-by-Step
Ask Data is perfect for quickly exploring your data without committing to building a formal worksheet. Let's walk through an example using a common retail sales dataset containing fields like 'Sales', 'Profit', 'Region', 'Sub-Category', and 'Order Date'.
Step 1: Open Your Data Source in Ask Data
From your Tableau Cloud or Tableau Server site, find the data source you want to work with. Click the three dots (...) next to it and select Ask Data from the menu. This will open up a new interface with a text bar at the top, ready for your questions.
Step 2: Ask Your First Question
Start with a simple question. The goal here is just to get a feel for how it works. You don't need to phrase it perfectly, just state what you want to see.
Let’s type in: total sales by sub-category
As you type, Ask Data will suggest fields and interpretations to help you. Once you press Enter, Tableau instantly analyzes your request and generates a visualization. In this case, it will likely create a horizontal bar chart showing each product sub-category and its corresponding total sales.
Step 3: Refine Your Visualization with Follow-up Phrases
The first graph is just a starting point. Now you can refine it by adding more instructions. Ask Data remembers your previous query, allowing you to build on it.
Suppose you want to see this as a different chart type. You don't need to start over, just tell it what to do:
show that as a treemap
Tableau will re-render the exact same data as a treemap. Now, what if you only want to see the top performers? You can filter the data with another command:
keep only the top 5
Finally, maybe you realize sales alone isn't enough context - you also want to see profitability. You can layer in another measure:
color by average profit
And just like that, you've created a sophisticated treemap showing the top 5 product sub-categories by sales, with colors indicating their average profitability. This whole process took a few sentences instead of several minutes of clicking, dragging, and formatting.
Building Advanced Graphs with Tableau Copilot
Tableau Copilot offers a more conversational and powerful way to build visualizations, especially when you need to create calculations or ask more complex questions. It resides in a side panel within your workbook, ready to help as you build.
Step 1: Open Tableau Copilot in Your Worksheet
When you're in a Tableau Public or Desktop workbook, you’ll find the Copilot icon in the toolbar. Clicking it opens a chat panel on the right side of the screen. This is your command center.
Step 2: Describe the Analysis or Chart You Need
With Copilot, you can be more descriptive. It's designed to understand intent, not just commands. Let's try to build something a bit more complex, like a trend line for profit over time.
You could say: create a line chart showing how profit has trended monthly over the last 3 years
Copilot will parse this request, identify the 'Profit' and 'Order Date' fields, create the necessary date aggregations, filter for the last three years, and build a line chart on your worksheet - all automatically.
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 3: Ask for More Complex Additions, Like Calculations
This is where Copilot really shines. Let's say you want to see the profit ratio, but you don't have a 'Profit Ratio' field in your data. Manually, you'd have to write a calculated field using the formula: SUM([Profit]) / SUM([Sales]).
With Copilot, you can just ask for it:
create a calculated field for profit ratio
Copilot will analyze your data, understand that profit ratio is typically profit divided by sales, and pop up the correct formula for your approval. You can even use it to troubleshoot existing formulas by pasting them into the chat and asking, "Can you explain this formula?" or "How can I fix this calculation?"
You could then follow up with a request like: show profit ratio by region on a map. Copilot would use the field it just helped you create to build a new map visualization instantly.
Best Practices for Writing Effective AI Prompts
Getting the hang of prompting is the key to unlocking the full potential of these AI tools. Here are a few tips to get better results:
- Start Simple, Then Iterate: Don't try to get the perfect graph with one massive, long prompt. Begin with a basic query (e.g., "sales by country") and then add layers of complexity ("in a map," "for 2023," "colored by profit").
- Use Your Field Names: The more you can use the actual field names from your data source, the less guesswork the AI has to do. Saying "show sum of Sales by Region" is more direct than "show me how much we sold in different areas."
- Be Specific About Aggregations and Chart Types: Clearly state whether you want to see the sum, average, count, or median of a metric. Likewise, if you have a chart in mind, just ask for it: "in a bar chart," "as a scatter plot," or "make a pie chart." If you don't specify, Tableau will pick what it thinks is the best representation for your data.
- Know Its Limits: For highly specific formatting or complex dashboard actions, you may still need to use the manual "drag-and-drop" interface. Think of the AI as a powerful assistant that can get your chart 90% of the way there in seconds, freeing you up for the final touches.
Final Thoughts
Tableau’s integrations with AI significantly lower the barrier for creating powerful data visualizations. By translating natural language into graphs and dashboards, tools like Ask Data and Copilot empower anyone, regardless of their technical skill, to find answers in their data quickly and efficiently. We believe that answering questions about your business shouldn't depend on mastering complex software. Getting insights from all your different data sources - be it Google Analytics, Shopify, or Salesforce - should be simple and feel like a conversation. With Graphed you can connect your scattered data in one click and use natural language to create live, drill-down dashboards instantly, freeing you to focus on growing your business instead of wrestling with reports.
Related Articles
How to Create Facebook Ads API for Claude Code
Create a Meta Marketing API access token that never expires, using a system user, so Claude Code can pull Facebook ad reports and manage campaigns.
ClickHouse vs Postgres: When to Switch to Columnar
Comparing ClickHouse vs PostgreSQL means matching storage architecture to workload. Row storage wins for transactions. Columnar wins for scan-heavy analytics.
Google Ads for Orthodontists: Get More Booked Consults
Most orthodontic Google Ads campaigns waste money on low-intent searches. The problem is structure, not the platform.