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

Creating a filtered metric (based on two conditions)

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi Everyone, 

 

I need a calculated metric that has to be filtered based on two conditions. 

My goal is to calculate the Conversion Rates of our sales funnel.

We are a ticketing system and have landing pages for each artist. If a user moves on in our sales funnel each step has a unique URL containing the different steps (i.e. "billing","merchandise", "purchase"...).

To calculate the conversion rates for the different steps I need two calculated metrics

1. Pageviews of the landingpage of an artist (i.e. pageviews of landing page containing "artist1")

2. Pageviews of the first step of our sales funnel (i.e. Pageviews of landing pages containing "artist1" AS WELL AS "billing")

 

For metric number 1 I tried this syntax: 
Pageviews * MAX(CASE WHEN REGEXP_MATCH(Landing Page, '.*gabirano.*') THEN 1 ELSE 0 END)

For metric number 2 I tried:
Pageviews * MAX(CASE WHEN REGEXP_MATCH(Landing Page, '(.*billing.*|.*gabirano.*)') THEN 1 ELSE 0 END)

 

For both I get almost the same number which is also like 10 times the number that is correct for the filtered metrics.

Can someone please help? 

Best regards, Anna

Creating a filtered metric (based on two conditions)

Follower ✭ ✭ ☆
# 2
Follower ✭ ✭ ☆

Hi Anna, 

Have you tried incorporating filters to your table/graphs?

 

For instance, setting the metric as "Page Views" and adding a filter (found at the bottom of the "Data" tab when customizing) to something like... Include "artist name" (a dimension) Equal to "artist1".

 

Creating a filtered metric (based on two conditions)

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Hi Rachael, 

thanks for the reply! 

The problem with this is the following: 

I need to calculate a metric out of 2 metrics that would need different filters. 

Conversion Rate (the calculated metric I need) = Metric 1 (Pageviews with landingpage "artist1") / Metric 2 (Pageviews of pages containing "artist1" AND "billing")

I don't really see, how I could solve this with filters....

 

But thanks anyway!! Greeting, Anna