How to Make an X Y Graph in Tableau with AI
Creating an XY graph, also known as a scatter plot, is one of the fastest ways to see if a relationship exists between two different numbers - like how your ad spend affects sales, or if more website traffic leads to more signups. This tutorial will walk you through how to build a classic XY graph in Tableau step-by-step. We’ll also cover how modern AI tools are changing the game, letting you create the same powerful visualizations by simply asking a question in plain English.
What is an XY Graph, Really?
At its core, an XY graph (or scatter plot) is a chart that uses dots to represent the values for two different numeric variables. The position of each dot on the horizontal (X-axis) and vertical (Y-axis) axis indicates the values for an individual data point. By looking at the collection of dots, you can instantly spot patterns, relationships, and outliers.
Why are they so useful? Scatter plots are brilliant for answering questions like:
- Correlation: Do two variables move in relation to each other? For example, does revenue increase as you spend more on marketing? (Positive correlation). Do customer complaints go down as you improve your support response time? (Negative correlation). Or is there no clear relationship at all?
- Outlier Detection: Which data points are way off from the average? A scatter plot makes it easy to spot a sales rep with unusually high performance or an ad campaign that completely missed the mark.
- Clustering: Are there natural groupings in your data? You might see that your customer base is split into distinct clusters based on their spending habits and how often they purchase.
For example, a marketing manager might plot "Ad Spend" on the X-axis and "Sales Revenue" on the Y-axis. Each dot could represent a specific campaign. If the dots trend upward from left to right, it signals that higher ad spend is generally linked to higher revenue. If the dots are scattered everywhere like they’ve been randomly sprinkled on the page, there probably isn't a direct relationship.
How to Make an XY Graph in Tableau: The Classic Method
Tableau is a powerful business intelligence tool, but it has a learning curve. Let’s break down the traditional process of building a scatter plot from scratch. We’ll use a simple dataset that tracks different marketing campaigns, their costs, and the revenue they generated.
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 1: Connect to Your Data
First things first, you need to bring your data into Tableau. Whether your data lives in an Excel spreadsheet, a Google Sheet, or a database, the process starts here.
- Open Tableau and, under the Connect pane, choose the type of file or database your data is in. Let's assume you're using an Excel file.
- Select your file, and Tableau will show you the available sheets. Drag the sheet containing your campaign data onto the canvas. Your data is now loaded and ready for analysis.
On the left-hand sidebar, you'll see your data fields organized into Dimensions (categorical data like 'Campaign Name' or 'Channel') and Measures (numerical data you can count or do math with, like 'Cost' and 'Revenue').
Step 2: Place Your Measures on the Shelves
Now, let's build the basic structure of the XY graph. You need to tell Tableau what to put on the X-axis and what to put on the Y-axis. For our example, we want to see how cost relates to revenue.
- Drag your independent variable (the one you control or change) to the Columns shelf. In our case, this is 'Cost'. This will form your X-axis.
- Drag your dependent variable (the one you suspect changes because of the other one) to the Rows shelf. Let’s use 'Revenue' for this. This creates your Y-axis.
At this point, you might be confused because Tableau will likely show just one single dot. Why? By default, Tableau aggregates your measures. That single dot represents the SUM of all costs and the SUM of all revenues in your entire dataset. To create a real scatter plot, we need to see each individual point.
Step 3: Show Me the Dots! (Disaggregation)
There are two ways to tell Tableau to show all your individual data points instead of just one summarized point.
Method 1: Disaggregate Measures This is the quickest way to see every single row from your data source as a separate mark. Go to the Analysis menu at the top and uncheck Aggregate Measures. Voila! All your dots should appear on the chart, each representing a row from your spreadsheet.
Method 2: Use a Dimension for Detail (Recommended) A better and more controlled way is to add a dimension to the Marks card. A dimension provides the level of detail for the visualization. Each unique value in that dimension will get its own dot.
- Drag a dimension that uniquely identifies each data point you want to plot - like 'Campaign ID' or 'Campaign Name' - from your Dimensions pane.
- Drop it directly onto the Detail box on the Marks card.
Now, Tableau will display a dot for each unique campaign, plotting that campaign's specific cost against its revenue. This is generally the preferred method because it gives you more control over your chart.
Step 4: Enhance Your Chart for Better Insights
Your basic XY graph is ready, but a little formatting goes a long way. Use the Marks card to add more layers of information.
- Color: Drag a dimension like 'Ad Channel' (e.g., Facebook, Google, LinkedIn) onto the Color box. Tableau will automatically assign a different color to each channel, so you can see if certain channels are performing better than others.
- Size: Want to see another metric at a glance? Drag a measure like 'Click-Through Rate' onto the Size box. Now, dots with higher click-through rates will appear larger.
- Trend Line: To visualize the correlation more clearly, switch to the Analytics pane (next to the Data pane). Find Trend Line and drag it onto your chart, placing it on the "Linear" option. Tableau will draw a line that best fits your data, giving you an immediate sense of the relationship's strength and direction.
The Future is Conversational: Building with AI
Going through the steps above isn’t terribly difficult once you know them, but there's an undeniable learning curve. It requires knowing what a "measure" is, where the "Marks card" lives, and why your data is aggregated by default. For many marketing and business professionals, this is a significant barrier. Mastering tools like Tableau or Power BI can feel like learning a specific software rather than focusing on the actual data insights.
This is where AI-driven data analysis changes everything. Instead of clicking through menus and dragging fields, you can now simply describe what you want to see. This technology lowers the barrier to entry so drastically that anyone, regardless of technical skill, can become a "data person." You no longer need to learn the software's unique language, you just use your own.
The core advantages of using natural language are:
- Speed: Go from a question to an answer in seconds. Building a report doesn't have to be a Monday morning chore that takes up half your day.
- Accessibility: Complex analysis is no longer reserved for data scientists or analysts. When a junior marketer or sales leader can ask their own questions, you create a more data-driven team overall.
- Flexibility: Once a chart is created, follow-up questions become effortless. Instead of struggling with filter menus, you can just ask, "What if we only look at US traffic?" or "Why did revenue drop last week?" The ability to drill down and explore keeps your train of thought going.
An AI-Powered Workflow for Creating an XY Graph
So, what does this actually look like in practice? Imagine you want to build the same Ad Spend vs. Revenue graph we made in Tableau, but with an AI data analyst.
Step 1: Connect Your Platforms (Once)
Instead of manually downloading CSVs and uploading them, AI analytics platforms are often built with direct integrations. You securely connect your Google Analytics, Shopify, Facebook Ads, Salesforce, and other accounts with a few clicks. This automation creates a single source of truth and pipes live data directly into your dashboard. The tedious Monday morning routine of downloading reports is eliminated completely.
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 2: Ask Your Question in Plain English
This is where the real shift happens. You skip the drag-and-drop entirely. You simply type a request, as if you were talking to a human analyst.
For our XY graph example, you might ask:
- "Show me a scatter plot of campaign cost vs revenue from my Facebook ads for last quarter."
- "Create an XY graph that compares visitors vs leads for our main landing pages."
- "Plot deals closed against total calls made for each sales rep this month from Salesforce data."
The AI understands these terms, knows what an "XY graph" is, and instantly generates the visualization for you. It recognizes that "campaign cost" is your X variable and "revenue" is your Y variable, intelligently fetching the underlying data from your connected Facebook Ads account and building the chart.
Step 3: Refine and Dig Deeper with Chat
No visualization is ever truly "done." The first chart almost always prompts another question. With a chat-based interface, this exploration is seamless.
Following up on your initial scatter plot, you could continue the conversation:
- "Okay, now color the dots by campaign objective."
- "Can you add a trend line to this?"
- "This is great. Now, make two copies of this chart. One for our US campaigns and one for our UK campaigns."
- "That one dot has really high cost but low revenue. Which campaign is it?"
Each instruction modifies the chart in real time. Rather than spending your cognitive energy trying to remember how to build the chart, you spend it on what the chart is telling you. The focus shifts from the mechanics of report building to the strategic insights that drive your business forward.
Final Thoughts
Learning how to build XY graphs in Tableau is a fantastic skill for visually discovering relationships in your data. It's a fundamental charting technique for anyone who works with numbers. At the same time, the rise of conversational AI is fundamentally changing our relationship with data by removing the technical barriers that have existed for so long.
We've lived the frustration of spending hours jumping between different ad platforms and SaaS tools, manually exporting CSVs, and trying to wrangle them together in spreadsheets just to answer a simple business question. That’s why we built Graphed—it automates away the tedious data gathering and allows you to create dashboards and reports - including complex XY graphs blending data from multiple sources - simply by describing what you need. It helps you get straight to the insights so you can get back to growing your business.
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.