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

Customize Filter Control by Page Value

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hello,

 

My Data Set looks like this:

 

Page value = /magname1/issue20/index.html

Page value = /magname1/issue21/index.html

Page value = /magname1/issue22/index.html

Page value = /magname2/issue15/index.html

Page value = /magname1/issue16/index.html

Page value = /magname1/issue17/index.html

 

How do I create a Filter Control that allows the report user to toggle between:

 

[] Magazine1 (showing all issues) and/or [] Magazine2 (showing all issues).

 

Thanks!

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Andrew D
June 2016

Re: Customize Filter Control by Page Value

Google Employee
# 5
Google Employee

Re: Customize Filter Control by Page Value

Google Employee
# 2
Google Employee
Hi Andrew,

To do what you want, you can create a calculated field in your data source that parses the Page Value dimension using the REGEXP_EXTRACT function:

REGEXP_EXTRACT( Page value , "^/(.*?)/" ) will evaluate data like this:

/magname1/issue20/index.html
/magname2/issue15/index.html

and return "magname1" for the first row and "magname2" for the second.

You can then use that calculated field as your filter dimension.

Does that make sense?

Rick

Re: Customize Filter Control by Page Value

[ Edited ]
Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Rick,

I followed these directions https://support.google.com/analytics/answer/6121409?hl=en and when trying to apply the calculation, the Page or Page Value dimension is not available to parse. And I get an error that REGEXP_EXTRACT is not allowed.

Please can you let me know if I should follow different steps to create the calculated field in the data source?

Thanks,

-Andrew

<edited by a Community Manager as noted below>
 
NOTE: This post has been edited by a Community Manager - per Community Guidelines - in order to remove contact information which was most likely due to an email or mobile footer. This is done in order to protect account security and/or privacy. Please be sure to remove this information in future replies. Thank you for your understanding.

Re: Customize Filter Control by Page Value

Google Employee
# 4
Google Employee
Hi Andrew

That Help Center page is for Google Analytics calculated metrics. That's not the same thing as a calculated field in Data Studio (it's confusing, I know, since the features are named similarly and both products are supported here in this forum). So to be clear, you're trying to do this in a Data Studio report, right?
Marked as Best Answer.
Solution
Accepted by topic author Andrew D
June 2016

Re: Customize Filter Control by Page Value

Google Employee
# 5
Google Employee
FYI, this is the Help Center article you want: https://support.google.com/360suite/datastudio/answer/6299685