How to Make a Double Bar Graph in Looker with AI
Creating a double bar graph to compare two sets of data side-by-side can feel like a chore in traditional reporting tools. But with the AI features built into modern platforms like Looker, what used to require navigating complex menus can now be done with a simple sentence. This article will walk you through exactly how to use Looker’s natural language capabilities to build a compelling double bar graph, step-by-step.
Why Use a Double Bar Graph in the First Place?
Before we build one, let's quickly cover why a double bar graph (also known as a grouped bar chart) is so useful. Its power lies in direct comparison. While a single bar graph is great for showing how one metric changes across different categories, a double bar graph lets you compare two different metrics for each of those same categories.
This allows you to spot relationships, disparities, and trends that you might otherwise miss. Here are a few common scenarios where a double bar graph shines:
Sales Performance: Comparing a sales rep's achieved sales vs. their sales quota.
Marketing Campaigns: Visualizing ad spend vs. conversions for different campaigns.
Website Analytics: Showing new users vs. returning users from various traffic sources.
E-commerce Growth: Comparing this month's revenue per product category against last month's revenue.
In each case, you're not just looking at one number, you're looking at two related numbers together, which provides much richer context.
Getting Started: Using Looker’s Natural Language Features
Traditionally in business intelligence tools, creating a chart involves finding a data source, selecting the dimensions and measures you need, dragging them into the right spots, and then choosing a visualization type. While effective, it requires knowing exactly where to find each data field and how the underlying data model works.
Looker’s AI-powered natural language feature changes this process entirely. Instead of clicking and dragging, you simply type a question in plain English, and Looker interprets your request to generate a visualization. This is a game-changer for team members who aren't data analysts but still need to answer questions with data. It understands context, so you can say "last week's sales" instead of manually programming the dates, or use common terms while the AI finds the right technical field name in the background.
How to Create a Double Bar Graph with an AI Prompt
Ready to build? All you need is access to a Looker "Explore" — which is simply a data source configured for you to ask questions of. Once you have that, the process takes just a few steps.
Step 1: Navigate to Your Looker Explore
Log in to your Looker account and open the Explore that contains the data you want to analyze. This might be an Explore for your sales data, marketing data, or website traffic, depending on what question you want to answer.
Step 2: Locate the Natural Language Query Bar
At the top of the Explore page, you should see a text field asking you to "Ask a question..." or something similar. This is where the magic happens. This is your direct line to the AI, allowing you to bypass the manual field selectors on the left-hand panel.
Step 3: Write Your Prompt Clearly and Specifically
Writing a good prompt is the most important step. A clear question gets you a clear answer. While the AI is smart, it's not a mind reader. The best prompts are structured to include three key components:
Metric 1: The first number you want to measure.
Metric 2: The second number you want to measure.
Dimension: The category you want to group them by.
A great format is: "Compare [Metric 1] and [Metric 2] by [Dimension]." You can also add a timeframe if needed.
Here are a few real-world examples:
For a sales team:
Compare booked revenue and sales quota by salesperson for this quarter.For an e-commerce store:
Show me Gross Merchandise Value and Total Cost by Product Brand for the last 90 days.For a marketing team:
What were our total ad clicks and conversions by campaign name last month?
Notice how specific these are. Vague questions like "show sales" won't work well because the AI won't know which sales metric you want or how to group the data.
After typing in your question, hit Enter or click the "Run" button.
Step 4: Check and Adjust Your Visualization
Looker's AI will parse your query and automatically generate a data table and a default chart. Often, it's pretty good at guessing the best visualization. However, it might default to a stacked bar chart or a line chart.
This is easy to fix:
Look at the Visualization tab.
Click on the Bar chart icon (usually represented by three vertical bars).
Next, click the Edit button. In the plot settings, you may need to ensure the series positioning is set to Grouped instead of Stacked. This will place the bars side-by-side rather than on top of each other.
And there it is — your double bar graph, created from a single sentence.
Refining Your Graph for Better Insights
Getting the initial chart is often just the beginning. The real value comes from iterating on it to uncover deeper insights. Here’s what to do next.
Customizing Colors and Labels
A well-formatted chart is easier to read and share. In the visualization's Edit menu, you can:
Change Colors: Update the bar colors to match your brand's palette or to make one metric stand out more than the other.
Edit Axis Labels: Make sure the X (horizontal) and Y (vertical) axis labels are easy to understand. For instance, rename a field like "sum_of_revenue" to simply "Total Revenue."
Add a Title: Give your chart a clear, descriptive title so anyone looking at it immediately understands what it represents.
Asking Follow-Up Questions to Dig Deeper
This is where the conversational aspect of AI analytics truly shines. Your first graph might lead to another question. Instead of starting over, you can often just ask a follow-up question. For example, after seeing the comparison of ad clicks and conversions, you might ask:
"Now only show campaigns with more than 100 conversions."
"Filter out the 'Brand Awareness' campaign."
"Sort this by conversions in descending order."
This iterative process allows you to explore your data naturally, slicing and dicing it until you find the exact piece of information you need.
Saving Your Graph to a Dashboard
Once you've created a visualization you find valuable, don't let it be a one-time analysis. Save it to a Looker Dashboard. This turns your chart into a dynamic report that will automatically update as new data comes in, allowing you to monitor these comparisons over time without ever having to rebuild the chart again.
Common Pitfalls and How to Avoid Them
Natural language querying feels intuitive, but a few common mistakes can trip up new users.
Being Too Vague: The most frequent issue is asking a prompt that is too broad. "Show traffic" leaves the AI to guess what kind of traffic (sessions, users?), by what dimension (source, country?), and for what time period. Always aim for specificity.
Mixing Up Measures and Dimensions: Remember, measures are the numbers you're analyzing (e.g., Revenue, Clicks, Count) and dimensions are the categories you're grouping by (e.g., Campaign Name, Country, Product Type). Make sure your prompt uses each correctly.
Trusting Blindly: The AI is an amazing starting point, but always give the final chart a quick sanity check. Does the data look right? Does it match what you expected? It's simply visualizing the data you have, so a quick check ensures the data model is configured correctly.
Final Thoughts
Building a double bar graph in Looker with AI transforms a technical task into a simple conversation. By articulating a clear question with your desired metrics and dimensions, you can almost instantly generate visuals that used to take significant time and expertise to build. The key is in refining your question and interacting with the results to go from surface-level data to actionable insights.
The ability to simply ask questions of your data without a technical barrier is a principle we built Graphed on from day one. Instead of relying on data teams to build out a complex Looker model, we let you connect directly to sources like Google Analytics, HubSpot, Shopify, and Facebook Ads. From there, you just ask for what you need — like "create a dashboard comparing Facebook Ads spend vs. revenue by campaign" — and get a shareable, real-time dashboard in seconds, allowing your whole team to find answers on their own.