How to Do Sensitivity Analysis in Looker with AI

Cody Schneider••7 min read

Ever created the perfect Looker dashboard and then immediately thought, "This is great, but what if…?" You've built a solid view of your historical data, but the real power comes from using that data to model the future. This is exactly what sensitivity analysis is for - testing how changes in one variable impact your key metrics.

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

This article will show you how to perform sensitivity analysis directly within Looker using its built-in tools. We'll also cover how a newer, AI-driven approach can help you get these answers faster and without writing a single line of code.

What Exactly is Sensitivity Analysis?

Don't be thrown by the technical-sounding name. Sensitivity analysis is simply a structured way of doing "what-if" analysis. It helps you understand the impact of uncertainty by asking questions like:

  • "What happens to our projected quarterly sales if our advertising cost-per-click (CPC) increases by 15%?"
  • "How will a 5% drop in our website's conversion rate affect our monthly revenue?"
  • "If we hire two more salespeople, how much would our sales pipeline value need to grow to cover their salaries?"

By simulating these changes with your existing data, you can identify which variables have the biggest effect on your outcomes. This is incredibly useful for strategic planning, setting realistic goals, and identifying potential risks before they become problems. You're essentially building a financial or operational model to stress-test your business assumptions.

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.

The Traditional Approach: Running Simulations in Looker with Parameters

While Looker doesn’t have a flashy, one-click "Sensitivity Analysis" button, you can build your own using a powerful feature in LookML: Parameters. A parameter creates an interactive filter field in your Explore where a user can input any value - like a percentage increase or a specific dollar amount. This value can then be used in other calculations.

Let's walk through an example. Imagine you're a marketing manager and you want to see how changing your total ad spend will affect your projected return on ad spend (ROAS).

Step 1: Define Your parameter in LookML

First, you need to ask a LookML developer (or hop into Developer Mode yourself) to add a parameter to the appropriate view file. This parameter will act as our input for an "Ad Spend Multiplier." If you want to test a 20% increase in ad spend, you'll input 1.20 into this field.

Here’s what the LookML for that parameter might look like:

parameter: ad_spend_multiplier {
  type: number
  label: "Ad Spend Multiplier (e.g., 1.2 for +20%)"
  default_value: "1.0"
}

Breaking this down:

  • parameter: ad_spend_multiplier: This declares a new parameter with the name ad_spend_multiplier.
  • type: number: Specifies that the input field will only accept numbers.
  • label: This is the user-friendly text that will appear above the filter field in your Looker Explore.
  • default_value: "1.0": This sets the starting value to 1.0, which means by default it will show your actuals without any changes (your ad spend multiplied by 1).

Step 2: Use the Parameter to Create New Measures

Now that you have your user input field, you need to put it to work. You'll create new measures that use the value from the ad_spend_multiplier parameter. This is done using Looker's Liquid syntax: {% parameter parameter_name %}.

You can create a new measure for projected_ad_spend and one for projected_roas:

measure: projected_ad_spend {
  type: sum
  sql: ${ad_spend} * {% parameter ad_spend_multiplier %} ,,
  value_format_name: usd
  label: "Projected Ad Spend"
}

measure: projected_roas {
  type: number
  sql: ${total_sales} / NULLIF(${projected_ad_spend}, 0) ,,
  value_format_name: decimal_2
  label: "Projected ROAS"
}

In this code:

  • The projected_ad_spend measure takes your actual ad spend and multiplies it by whatever the user enters into our new filter box.
  • The projected_roas measure then calculates the new ROAS based on this projected spend.
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: Visualize the "What-If" Scenario in an Explore

Once those LookML changes are pushed to production, the rest is easy. Navigate to the appropriate Explore in Looker.

  1. You will now see a new filter at the top called "Ad Spend Multiplier (e.g., 1.2 for +20%)".
  2. Add your original measures (like Total Ad Spend and ROAS) and your new measures (Projected Ad Spend and Projected ROAS) to your report.
  3. Now, just change the value in the "Ad Spend Multiplier" box and hit Run. Enter 1.15 and see what a 15% increase in spend does to your ROAS. Enter 0.90 to model a 10% decrease.

You can create line charts, bar charts, or scorecards to compare the "Actual" figures versus the "Projected" figures side-by-side, giving you and your team an interactive dashboard for modeling scenarios.

The Limits of the Manual Method

This parameter method is powerful, but it has its downsides:

  • It's Rigid: You need to pre-define every single "what-if" scenario you want to test in LookML. If you suddenly want to model changes to conversion rate instead of ad spend, you have to go back to the code, write a new parameter, and deploy the changes.
  • It Requires Technical Skills: Building these scenarios requires an understanding of LookML. It often creates a bottleneck, as marketers and business managers must wait for an analyst or developer to build the specific model they need.
  • It's Not Conversational: The process is clunky. You can't easily ask follow-up questions or test multiple variables at once (e.g., "what if ad spend goes up 10% and our conversion rate drops by 3%?").

A Faster Way: Using AI for Sensitivity Analysis

The core challenge with sensitivity analysis is that the most valuable questions are spontaneous. They come up in meetings or while reviewing reports. Jumping into LookML every time you have a new question is just too slow. This is where modern AI-powered analytics tools completely change the game.

Instead of hard-coding a few scenarios into a dashboard, you can simply ask your question in plain English and get an answer instantly.

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.

From Clicks to Conversation

Imagine having a data analyst on your team who you could just talk to. That's the idea behind conversational AI analytics. The process becomes dead simple:

  1. Connect your data sources (like Google Analytics, Shopify, Salesforce, etc.).
  2. Start asking questions.

Instead of building a parameter for marketing spend, you'd just ask:

"Create a bar chart comparing our actual Q3 ROI to the projected ROI if Facebook Ads spend increased by 10%, 20%, and 30%."

The AI understands the request, calculates the three scenarios on the fly, and generates the comparison chart for you. You skipped all the LookML steps.

This allows for a level of fluid exploration you can't get with pre-built dashboards. One question naturally leads to another:

  • "Okay, which campaign has the best projected ROI at the 20% increase level?"
  • "What's the breakeven conversion rate if we go forward with that 20% increase?"
  • "Create a table that models our total profit if our manufacturing cost increases by 5% and our ad spend increases by 10%."

Why an AI Approach Works Better for "What-If" Analysis

Using natural language for analysis overcomes the primary limitations of the manual method:

  • Speed and Agility: You can test dozens of hypotheses in the time it would take to write a single LookML parameter. There's no code. No developers. No waiting. Just insights in seconds.
  • Accessibility for Everyone: This unlocks financial and operational modeling for non-technical team members. Your marketing manager, head of sales, or founder can all perform complex sensitivity analysis without needing to learn a BI tool or asking their data team for help.
  • Discovering Deeper Insights: One answer often sparks a more important question. With a conversational tool, you can follow that thread of curiosity immediately, digging deeper and deeper until you get to the root cause or the key insight you were looking for.

Final Thoughts

Looker's parameter feature provides a structured way to build interactive "what-if" models for scenarios you know you'll need to revisit often. However, for the kind of on-the-fly sensitivity analysis that leads to real business breakthroughs, waiting for LookML updates is simply too slow and rigid.

At Graphed, we built our tool around the belief that data analysis should be a conversation, not a coding exercise. Instead of being limited by pre-defined dashboards and filters, you can connect your data sources and just ask for what you need. AI handles generating the visualizations and reports, turning a complex, multi-step process into a simple prompt. This gives your entire team the power to model outcomes, test assumptions, and make smarter, data-driven decisions in seconds.

Related Articles