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

Split a string in Data Studio

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭



Does anyone know of a way to split a string in Data Studio?


I've tried to do this with REGEXP_EXTRACT but it seems it can't be done with RE2 syntax.


What I'd like to do is, given a dimension (let's call it "Tags") where values are like these ones:


TAGS                                        METRIC

one,two,three                                 3

two,one                                          1

one                                                1

three, three                                   1          


create a calculated field "Separated tags" where each row is a unique separated value (with aggregated metric):


Separated tags                         METRIC

one                                                    5    

two                                                     4

three                                                   4

This regex is as far as I could get, but it's nowhere near what I need:



I know I can process this outside of Data Studio and then feed it back in, but that's cumbersome and I'd like to neatly solve it within the tool. Any ideas?


If it can't be done, I've started a feature request thread here, so stop by if you'd like to chip in:



Split a string in Data Studio

Visitor ✭ ✭ ✭
# 2
Visitor ✭ ✭ ✭

I have the same problem. Could you solve it?