AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Data Studio
2.4K members online now
2.4K members online now
Ask questions about Data Studio
Guide Me
star_border
Reply

Like text function in data studio calculated field

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi,

In google data studio, my channel source has values like this:

- facebook.com

- m.facebook.com

- lm.facebook.com

- web.facebook.com

 

I tried to create a calculated field

case when source like ('%facebook%) then 'facebook' else 'other' end

 

but it doesn't work.... Any tips on a similar like function in data studio syntax?

 

Thanks

Like text function in data studio calculated field

Visitor ✭ ✭ ✭
# 2
Visitor ✭ ✭ ✭

You can use:

Case

When REGEXP_MATCH(Source , "((?i).*facebook).*") THEN "Facebook"
Else "Other"
End