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

Issues Grouping Sources in Data Studio

Follower ✭ ☆ ☆
# 1
Follower ✭ ☆ ☆

Hi,

 

I am creating a report in Data Studio and I need to aggregate all sources in the following categories: AdWords, Facebook, Organic, Direct, Blog, Others. I am using the following formula: 

 

CASE WHEN REGEXP_MATCH(Source / Medium, "(google / cpc)"  ) THEN "AdWords" WHEN REGEXP_MATCH(Source, "(facebook|m.facebook.com|lm.facebook.com|facebook.com|l.facebook.com|Facebook|mobile.facebook.com|web.facebook.com|business.facebook.com|review.intern.facebook.com|es-la.facebook.com|apps.facebook.com|facebook)" ) THEN "Facebook" WHEN REGEXP_MATCH(Source / Medium, "(google / organic)" ) THEN "Organic" WHEN REGEXP_MATCH(Source / Medium, "(direct / none)" ) THEN "Direct" WHEN REGEXP_MATCH(Source, "(blog.ultracasas.com)" ) THEN "Blog" Else "Otros" END
 
However, the formula, instead of segmenting Direct traffic, it is adding it as Others.Please help me solve this issue. Attached is a caption: Screen Shot 2016-09-23 at 10.28.56 AM.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Esteban V
September 2016

Issues Grouping Sources in Data Studio

[ Edited ]
Visitor ✭ ✭ ✭
# 2
Visitor ✭ ✭ ✭

You can try this, i think its work (i'm new here)

 

REGEXP_MATCH(Source / Medium, "(.*direct.*)" )

or

REGEXP_MATCH(Source / Medium, ".direct. / .none." ) 

View solution in original post

Marked as Best Answer.
Solution
Accepted by topic author Esteban V
September 2016

Issues Grouping Sources in Data Studio

[ Edited ]
Visitor ✭ ✭ ✭
# 2
Visitor ✭ ✭ ✭

You can try this, i think its work (i'm new here)

 

REGEXP_MATCH(Source / Medium, "(.*direct.*)" )

or

REGEXP_MATCH(Source / Medium, ".direct. / .none." ) 

Issues Grouping Sources in Data Studio

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

How would you pull in another metric and filter it by direct none traffic? What would that look like! PLEASE!