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
2K members online now
2K members online now
Ask questions about Data Studio
Guide Me

Regexp_Extract Not Working

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭



I am trying to extract the end of a url when my event action's from google analytics are a download and create a new calculated dimension in Data Studio. I want to extract the string after the last slash of the url all the way to the end of the url. So far I have written the following case statement, but DataStudio tells me that it cannot parse the formula. Could anyone tell me why this doesn't work? 


Here is the event action: 



Here is what I want to extract: 



Here is the calculated dimension I wrote: 

CASE WHEN REGEXP_MATCH(event action, 'download.*') THEN REGEXP_EXTRACT(event action, '\/([^\/]+)\/?$') ELSE Event Action END


Here is what i get in return: 

could not parse formula


Screen Shot 2017-07-10 at 5.24.22 PM.pngScreen Shot 2017-07-10 at 5.24.31 PM.png