Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save madilk/096645ce31c21e3349c4085471037c1b to your computer and use it in GitHub Desktop.
Save madilk/096645ce31c21e3349c4085471037c1b to your computer and use it in GitHub Desktop.
Datastudio - Group content where page starts with - as pattern

CASE

WHEN REGEXP_MATCH(Page,"((?i).^/blog).") THEN "Blog"

WHEN REGEXP_MATCH(Page,"((?i).^/contact).") THEN "Contact"

ELSE "Other"

END

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment