0
votes

I'm trying to use Google Data Studio to build a dashboard of browser versions. The "Browser Version" field in Google Analytics has too much detail so I want to extract everything before the . in a version number. I've tried creating a new field with the following formula, but keep getting an error "Could not parse formula". I've tested this RegEx on regex101.com and it seems to work so maybe I'm not understanding something about Google Data Studio?

REGEXP_EXTRACT(Browser Version,'^(.+?)\.')
1
Try REGEXP_EXTRACT(Browser Version,'^.+?\.') Is Browser Version a legal name?wp78de

1 Answers

2
votes

Try the below regular expression. I believe the issue is because (not set) is also a possible value for the Browser Version dimension, so your regex must cater for that condition as well.

REGEXP_EXTRACT(Browser Version,'^\\D*(\\d+)\\D*')