How to Make a Pie Chart in Tableau with AI
Building a pie chart in Tableau used to mean dragging and dropping dimensions and measures until you got what you wanted. But with Tableau's AI features, you can now create visualizations simply by asking for them in plain English. This article will show you how to skip the manual work and use natural language to make a pie chart in Tableau, turning a multi-step process into a single sentence.
Why Use AI to Create Your Tableau Charts?
While the classic drag-and-drop interface in Tableau is powerful, using its AI-driven features like Ask Data changes the game. It's not just a novelty, it offers practical benefits that speed up your workflow and make data more accessible to your entire team.
It’s Blazing Fast
Let’s be honest: finding the right fields in a complex data source can be a tedious process. You have to locate the correct measure, find the right dimension to slice it by, choose the chart type from the "Show Me" menu, and then apply filters. With AI, you can accomplish all of this in one go. Typing "Show me sales by region as a pie chart" is significantly faster than hunting, clicking, and dragging your way to the same result.
It Democratizes Data Analysis
Perhaps the biggest advantage is that it empowers non-technical users. Your marketing manager, sales lead, or CEO probably doesn’t have the time to complete an 80-hour Tableau proficiency course. They just want answers. Natural language query (NLQ) tools remove the technical barrier, allowing anyone who can ask a question to build their own visualizations. This means your data analysts don't get tied up building basic charts and can focus on more strategic analysis.
It Encourages Data Exploration
Working with data becomes more of a conversation and less of a formal procedure. You can ask an initial question, see the result, and immediately ask a follow-up. For example, after creating a sales by region pie chart, you might ask, "Now filter for only the Technology category" or "How did this look last quarter?" This back-and-forth flow makes it easier to dig deeper into the data and uncover insights you might have missed when following a rigid, step-by-step creation process.
It Frees You to Focus on Insights
The goal of data analysis isn't to create charts, it's to find meaningful insights that drive business decisions. By automating the mechanical parts of chart creation, you can spend less time being a "chart builder" and more time being an analyst. You can focus on the what and the why behind the numbers instead of getting bogged down in the how of the software.
Tableau's AI Features for Data Visualization
Tableau's AI capabilities are integrated through a few key features. To make a pie chart with AI, the primary tool you'll use is "Ask Data."
Ask Data
Announced a few years back, Ask Data is Tableau's natural language query (NLQ) engine. It’s designed to understand intentions from plain-language questions and automatically generate visualizations. You can ask questions like "revenue by product line last year" and Ask Data will interpret your query, pick the relevant fields from your data source, and create an appropriate chart - often defaulting to a bar chart, but you can explicitly ask for a pie chart or another type.
This feature lives within Tableau Server, Tableau Cloud, and Tableau Desktop (when connected to a published data source). It makes ad-hoc analysis incredibly simple for anyone with access to the data.
Explain Data
While Ask Data helps you create visualizations, Explain Data helps you understand them. Once you have a chart, you can select a specific data point (like an unusually large slice in your pie chart) and activate Explain Data. Tableau then runs statistical models in the background to analyze your entire data source and propose potential explanations for that specific value. It might find that the high sales in one region were driven by a single large order or correlated with a specific marketing campaign. It’s an excellent way to move from observation to insight without having to manually sift through the data yourself.
Tableau Pulse
Tableau Pulse is one of the newest and most prominent additions to the platform. It takes a more proactive approach. Instead of waiting for you to ask a question, Pulse automatically surfaces key metrics and insights relevant to you directly on your homepage. You can follow specific metrics, and Pulse provides automated digests - in natural language - summarizing what changed and why. You can use it as a starting point, asking follow-up questions in natural language to dive deeper into a metric that catches your eye.
For this tutorial, our main focus will be on Ask Data, as it’s the most direct way to generate a pie chart from scratch using a simple sentence.
How to Make a Pie Chart in Tableau Using AI (Ask Data)
Ready to build one yourself? Here’s a straightforward guide to creating your first pie chart using natural language in Tableau.
Step 1: Ensure Your Data is Ready
The success of any AI query depends on the quality of the underlying data. Before you start, make sure you're using a well-structured and properly published data source.
Use Clear Field Names: Your data source should have intuitive field names. Ask Data is clever, but it works best when "Customer Segment" is named Customer Segment, not C_Seg_101.
Define Data Roles: Make sure geographical data (like Country, State, or City) is assigned the proper geographic role and numbers are correctly identified as measures. Tableau often handles this automatically on import, but it’s always good to double-check.
Publish Your Data Source: Ask Data primarily works on data sources that have been published to Tableau Server or Tableau Cloud. This allows Tableau to build an index and model of your data, making the natural language processing work effectively.
Step 2: Access the Ask Data Interface
Once you've published your data source, you can access Ask Data in a few ways:
From the home page of your Tableau Server or Cloud site, find your published data source and select it. This will open the Ask Data page directly.
When creating a new workbook in Tableau Cloud or a new sheet in Tableau Desktop (connected to a published data source), you can drag the "Ask Data" object onto your dashboard.
You’ll see a search bar at the top of the screen - this is where the magic happens.
Step 3: Ask Your Question in Plain English
Now, simply type what you want to see. The key is to be clear but not overly rigid. You can phrase your request in several ways.
For a basic pie chart showing sales distribution across different product categories, you could ask:
Show me my sales by category as a pie chart
To get more specific, you can add filters and other details directly into your query:
What is the breakdown of profit by Sub-Category for Furniture in 2023 as a pie chart?
Here are a few more examples of good prompts:
"Share of website sessions by marketing source as a pie"
"Pie chart of order quantity by ship mode"
"What percentage of customers came from each region in a pie chart?"
As you type, Ask Data will suggest relevant fields and offer auto-completed questions based on your data source. Hit Enter, and Tableau will instantly generate the pie chart for you.
Step 4: Refine and Save Your Visualization
Once your pie chart appears, it's not a static image. You can continue interacting with it.
Keep asking questions: Tweak the result with follow-up prompts like, “filter for the top 5” or “change category to segment.”
Use the side panel: Ask Data populates the Data pane on the left with fields used in the visualization. You can manually drag in other fields, like adding Profit to the tooltip, or use the menu to change aggregations from SUM to AVG.
Save Your Work: Pleased with your chart? You can save it as a new sheet in a workbook directly from the Ask Data interface. From there, you can add it to a dashboard, adjust colors and fonts with the traditional editor, and share it with your team.
Remember the Rules: Pie Chart Best Practices
AI can help you build a pie chart faster than ever, but it can’t tell you when a pie chart is the right choice. To make your data visualizations clear and effective, keep these fundamental best practices in mind.
1. Show Proportions of a Whole
A pie chart’s primary job is to show how different parts make up 100% of a total. Only use it when your categories are mutually exclusive and add up to a meaningful whole. Sales by Region is a perfect use case because a sale belongs to only one region, and all regional sales add up to your total sales. Comparing non-additive metrics, like Website Visitors vs. Social Media Followers, is not an appropriate use for a pie chart.
2. Limit Your Slices
Our brains aren't great at comparing the sizes of different angles. A pie chart becomes noisy and nearly impossible to read when it has more than 5-7 slices. If you have many categories, consider grouping the smallest ones into an "Other" category or switching to a bar chart, which is much better for comparing precise values across multiple categories.
3. Label Slices Clearly
Don't make your audience guess. Each slice should be labeled with both the category name and its corresponding value (either the numeric value or the percentage). Relying only on a color-coded legend forces the viewer to constantly look back and forth, making it harder to absorb the information.
4. Order Your Data Logically
To make comparisons easier, order the slices in a logical sequence. The most common method is to arrange them from largest to smallest, starting at the 12 o'clock position and moving clockwise.
Final Thoughts
Using Tableau's AI features like Ask Data can dramatically accelerate your analytics workflow. It bypasses the need for technical skills, making it possible for anyone on your team to explore data and visualize answers to their most pressing business questions simply by asking.
Getting insights doesn't have to be a complicated, multi-step process locked behind complex software. At Graphed, we’ve built our entire platform around this idea. We let you connect marketing and sales sources like Google Analytics, Shopify, and Facebook Ads in seconds, then use natural language to build entire dashboards, not just single charts. Instead of learning your way around an enterprise BI tool, you can just ask questions and get instant, real-time answers to what's driving your business growth.