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

CONTAINS_TEXT

Returns true if the specified text is found in the field or expression; otherwise, returns false.

Sample usage

CONTAINS_TEXT(Campaign, "Sale")

Syntax

CONTAINS_TEXT( X, text )

Parameters

  • X - a field or expression of any type.
  • text - the text to find within X. text can be a field, expression, or literal value. text is case-sensitive.

Examples

Example formula Input Output
CONTAINS_TEXT(Campaign, "Sale") Summer Sale true
CONTAINS_TEXT(Campaign, "discount") Summer Sale false

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.