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

Checkout flow calculations in Data Studio (CASE statement)

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi - I'm trying to create a version of the GA checkout behavior report using Data Studio.  I'm using scorecards to show abandonment rates at each stage of my checkout flow, but for some reason I can't get the right numbers.  

 

First step is using a CASE statement count the number of sessions at each step.  Here is my statement for CHECKOUT_1:

Checkout 1 total => CASE WHEN Shopping Stage  IN ("CHECKOUT_1") THEN "yes" END

 

In theory this returns 194 under "yes", and it does when I create a table with Checkout 1 total as the dimension and Sessions as the metric, but when I create a "count" metric using count(Checkout 1 total) and put it in a scorecard chart, it returns 19.  I have no idea where the 19 is coming from.

 

Any advice/ideas what I'm doing wrong?  Is there an easier way to do what I want to do?  Also, shouldn't something like COUNT(regexp_match(Shopping Stage, "CHECKOUT_1") work?

Checkout flow calculations in Data Studio (CASE statement)

Participant ✭ ☆ ☆
# 2
Participant ✭ ☆ ☆

Sorry I don't have a better response, but I am not getting accurate results in Data Studio using a Google Analytics datasource with COUNT or COUNT_DISTINCT.  My best guess is that DS is doing some type of aggregation before doing the COUNT in my experience.

 

Don't know if there's any helpful info here, but I'm keeping an eye on it for resolutions:

 

https://www.en.advertisercommunity.com/t5/Data-Studio/Count-Distinct-Not-working/td-p/871112

Checkout flow calculations in Data Studio (CASE statement)

Explorer ✭ ✭ ☆
# 3
Explorer ✭ ✭ ☆

@Chris D

 

 

You are counting line with the value "yes" in your scorecard, not the number of sessions with your checkout 1 total with "yes".

 

In your scorecard, set the metric "Sessions" and "checkout 1 Total" as dimension. 

 

Then, add a filter in your scorecard

Create a filter "Only YES value

Include Checkout 1 total contains "Yes"

 

It will be good Smiley Happy