Looker Studio is now called Data Studio. Learn more about this change.

REPLACE

Returns a copy of the original text, replacing all occurrences of the search text with the replacement text.

Sample usage

REPLACE(Campaign, "Summer", "Spring")

Syntax

REPLACE( X, Y, Z )

Parameters

  • X - a field or an expression of any type.
  • Y - a field or an expression of any type.
  • Z - a field or an expression of any type.

Examples

Example formula Input Output
REPLACE(Campaign,"Summer","Spring") Summer Sale Spring Sale
REPLACE(Campaign,"Sale","Discount") Summer Sale Summer Discount

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026年08月26日 UTC.