Notification

This article is about Looker Studio. For Looker documentation, visit https://cloud.google.com/looker/docs/intro.

Strona nie jest aktualnie dostępna w Twoim języku. Możesz wybrać inny język u dołu strony lub przetłumaczyć na wybrany język zawartość dowolnej strony, używając funkcji tłumaczenia dostępnej w Google Chrome.

SUBSTR

Returns a specific sequence of characters from the text.

Sample usage

SUBSTR(Campaign, 1, 6)

Syntax

SUBSTR(X, start_index, length)

Parameters

  • X - a field or expression of any type.
  • start_index - the position from the start of the string from which to begin extracting.
  • length - the number of characters to extract.

Notes

  • The first character of a field is at index 1.
  • To begin extracting from the end of the string, use a negative index. The last character of a string is at index -1, the second to the last is at -2, etc.

Examples

Example formula Input Output
SUBSTR(Campaign, 1, 6) Summer Sale Summer
SUBSTR(Campaign, -4, 4) Summer Sale Sale

Related resources

Czy to było pomocne?

Jak możemy ją poprawić?
true
What's new in Looker Studio?

Learn about new features and recent changes. Looker Studio release notes live on Google Cloud.

Search
Clear search
Close search
Main menu
5361989291344908335
true
Wyszukaj w Centrum pomocy
true
true
true
true
true
102097
false
false