How to Remove Null in Looker Studio

Cody Schneider8 min read

Nothing brings your reporting momentum to a halt faster than staring at a chart broken by unexpected (null) values. Seeing those empty rows in your tables or sudden gaps in your line charts is a common frustration, but it doesn't have to derail your analysis. Handling these missing values is a fundamental skill for creating clean, professional, and accurate dashboards in Looker Studio.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

This tutorial will walk you through exactly how to remove and manage null values so you can build reports that are both visually appealing and trustworthy. We'll cover everything from quick chart-level fixes to more robust data-source level solutions.

What Are 'Null' Values, Anyway?

Before diving into the fixes, it's helpful to understand what null actually represents. In the world of data, null is not the same as zero or an empty text string. Instead, null signifies the absence of a value. It means the data is unknown, missing, or simply not applicable for that particular record.

You’ll encounter nulls for many reasons, including:

  • Incomplete Forms: A user signs up but leaves the 'Company Name' field blank.
  • Tracking Issues: A tracking script fails to fire, resulting in a null value for a 'UTM Campaign' dimension.
  • Optional Data: A sale is recorded in your database, but the 'Discount Code' field is null because no discount was used.
  • Left Joins: When you blend data sources, a record in the left table might not have a matching record in the right table, creating nulls in the columns from the right table.

While often harmless in a raw dataset, nulls can cause major headaches in Looker Studio. They can break calculations (you can't average a number with a null), distort totals, and make your beautiful visualizations look incomplete or just plain wrong. Cleaning them up is essential for accurate reporting.

Method 1: The Quick Fix with Chart-Level Filters

The fastest way to deal with null values is to filter them out of a specific chart or table. This method doesn't change your underlying data source, it simply tells a single visualization to ignore any rows where a specific field is null.

This approach is perfect when you only need to clean up one or two charts and don't want to affect the entire report.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

How to Add a "Not Null" Filter

Let's say you have a table showing Revenue by Campaign, but some campaigns are showing up as (null) and you want to hide them from this view.

Here are the steps:

  1. Select the chart or table you want to modify.
  2. In the properties panel on the right, make sure you're in the Setup tab.
  3. Scroll down until you see the Filter section and click "Add a filter".
  4. The filter creation menu will pop up. Give your filter a descriptive name, like "Exclude Null Campaigns."
  5. Set up the filter conditions as follows:
  6. Click the Save button at the bottom right.

That's it! The chart will instantly update to hide any rows where the Campaign field was null. This method is straightforward and effective for isolated issues. The main drawback is a lack of scalability, if you want to exclude null campaigns from five different charts, you have to apply this filter to all five charts individually.

Method 2: Create a Permanent Fix with Calculated Fields

For a more permanent and consistent solution, you can create new fields at the data source level that replace null values with something else. This approach changes how the data is handled for your entire report, ensuring consistency and saving you from adding filters to every single chart.

The go-to tool for this is the CASE statement. A CASE statement is a powerful formula that works like a series of "if-then" instructions.

How to Create a Calculated Field

  1. Go to the top menu and select Resource > Manage added data sources.
  2. Find the data source you want to edit and click Edit.
  3. In the top right corner of the data source editor, click ADD A FIELD.
  4. You're now in the calculated field editor. This is where you'll write your formulas.

Replacing Nulls in Numeric Fields (Metrics)

Let's say you have a Sales Bonus metric, but many entries are null instead of 0. This can break calculations like average bonus. By replacing the nulls with zeros, you can fix your calculations.

In the calculated field editor:

  • Give the new field a name, like Sales Bonus (cleansed).
  • Enter the following formula in the Formula box:
CASE
  WHEN Sales Bonus IS NULL THEN 0
  ELSE Sales Bonus
END

Let's break this down:

  • CASE: This starts the function.
  • WHEN Sales Bonus IS NULL: This is the condition. It checks if the value in the "Sales Bonus" field is null.
  • THEN 0: If the condition is true, it returns 0.
  • ELSE Sales Bonus: If the condition is false (meaning the field is not null), it returns the original value from the "Sales Bonus" field.
  • END: This closes the CASE statement.

Now, just click Save. You can use this new Sales Bonus (cleansed) field in all your charts instead of the original, and you'll never have to worry about nulls from that field again.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Replacing Nulls in Text Fields (Dimensions)

Similarly, you can clean up text dimensions. Imagine you have a Region dimension, but some records are null. Instead of showing a blank, you might want to label this as "Uncategorized" for better clarity.

  • Give the new field a name, like Region (grouped).
  • Enter the following formula:
CASE
  WHEN Region IS NULL THEN "Uncategorized"
  ELSE Region
END

This functions exactly like the previous example, but instead of replacing the null with a zero, it replaces it with the text string "Uncategorized". Now your geo charts and region tables will be cleaner and more descriptive.

Method 3: Other Functions for Handling Nulls (COALESCE and NARY_MAX)

While the CASE statement is the most versatile tool, Looker Studio has a couple of other functions that offer a more streamlined syntax for simple null replacements.

Using COALESCE

The COALESCE function is purpose-built for handling nulls. It inspects a list of fields or values and returns the first one that isn't null. This makes it a perfect, single-line replacement for a simple CASE statement.

To replace null values in our Sales Bonus field with 0:

COALESCE(Sales Bonus, 0)

And to replace nulls in our Region field with "Uncategorized":

COALESCE(Region, "Uncategorized")

This code is cleaner and more readable, achieving the same result as the more verbose CASE statement. It's often the preferred method for simple null substitutions.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Using NARY_MAX (For Numeric Fields)

The NARY_MAX function is a clever workaround for replacing null with 0 in non-negative numeric fields. The function returns the maximum value from a list of inputs. Because Looker Studio treats null as less than 0, this function effectively ignores the null.

The formula looks like this:

NARY_MAX(Sales Bonus, 0)

If Sales Bonus has a value (e.g., 500), the function compares 500 and 0 and returns 500. If Sales Bonus is null, the function compares null and 0 and returns 0. It's a quick and simple trick, though COALESCE is generally considered a more explicit and standard way to achieve this.

Best Practices to Keep in Mind

Before you go on a null-removing frenzy, here are a few best practices to consider:

  • Understand the "Why" Behind the Null: Always ask why a value is null before you replace or remove it. Is it an empty form field, or is it a sign that your data collection is broken? A null discount code is normal, a null transaction ID could be a serious problem. The context determines the right course of action.
  • Choose Context-Appropriate Replacements: Replacing a null revenue value with 0 makes sense. But what about a null rating on a 1-5 scale? A 0 would skew the average downward. Sometimes, it's better to exclude nulls with a filter or replace them with a descriptive text value like 'Not Rated' rather than forcing a numeric value.
  • Maintain Consistency: Stick to one method for your entire report. Handling nulls with calculated fields at the data source level is the best way to ensure every chart and table treats missing data the same way.

Final Thoughts

Effectively managing null values separates a functional dashboard from a professional one. Whether you opt for a quick chart-level filter to fix an immediate problem or use calculated fields with functions like CASE or COALESCE for a more permanent solution, cleaning up this missing data is a critical step in building reports that you and your stakeholders can trust.

Mastering these formulas is a big step, but data preparation is often the most time-consuming part of reporting. This is exactly why we built Graphed. We connect to all your marketing and sales data sources - like Google Analytics, Shopify, Facebook Ads, and Salesforce - and let you build live dashboards simply by asking for what you want in plain English. Instead of manually writing CASE statements to clean up messy fields, you can just tell our AI what you need visualized, and it handles the data cleaning and report building for you automatically. It's like having a data analyst on your team, giving you back hours to focus on insights instead of formulas.

Related Articles