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

Please help - Seemingly Impossible calculated field

[ Edited ]
Follower ✭ ✭ ☆
# 1
Follower ✭ ✭ ☆

I have been trying for the past several hours to write a calculated field in Google Data Studio.

I need to know how to get a percentage calculation on some events. Table below:

|Event Label|Event Action    |Total Events|
|-----------|----------------|------------|
|CTA 1      |Link Displayed  | 100        |
|CTA 1      |Link Clicked    | 20         |

I want to get the conversion, which means dividing 20 by 100 but I can't seem to write a calculated which does that. I feel like I've tried everything e.g.:

sum((total events(link clicked)) / total events(link displayed)))

And the like. Please help!

Thanks

Re: Please help - Seemingly Impossible calculated field

Explorer ✭ ✭ ☆
# 2
Explorer ✭ ✭ ☆

hello @Michael C

 

Well, you won't do it like this, because you don't have a field with total of (Label Action clicked + Label Action displayed)

I purpose you a solution. 

Go to edit your data source in Data Studio. 


First, dupplicate your field "Total Events" and call him "Nb Events"

Set aggregation of the field "Total Events" at "none"

Add a field "Total" with the formula : 120*1
the result will be 120, your 100% (If your total is 150, set 150 in the formula)

 

Then create an other field "TotalPercent" with the formula: Sum(Total Events/Total)

For this field, type is "Numeric". Set it to "Percent"

 

Now you can add your field in your table chart. 

 

PercentTotal.PNG

 

Hope it will help you Smiley Happy

 

 

Please help - Seemingly Impossible calculated field

Follower ✭ ✭ ☆
# 3
Follower ✭ ✭ ☆

Thank you so much. I don't fully understand it right now but later on in the day when I get a chance to sit down and have a play with it, I'm sure it'll make sense.

 

Thanks!

Please help - Seemingly Impossible calculated field

Explorer ✭ ✭ ☆
# 4
Explorer ✭ ✭ ☆

I hope so, if you don't understand right, let me know it Smiley Wink

Please help - Seemingly Impossible calculated field

[ Edited ]
Follower ✭ ✭ ☆
# 5
Follower ✭ ✭ ☆

Hi, I found out how to duplicate a column. I was looking in the wrong part of the UX. 

 

So I don't think maybe I explained myself correctly so here is a screen grab :-)

 

Screen Shot 2017-05-06 at 18.23.16.png

 

So to get the % conversion for each CTA (CTA-share and CTA-review) I need to divide number of clicks by number of times displayed, so...

 

((CTA-review->link_clicked) / (CTA-review->link_displayed)*100)

 

and the same for the CTA-share one.

 

 

Please help - Seemingly Impossible calculated field

Visitor ✭ ✭ ✭
# 6
Visitor ✭ ✭ ✭

You would like to get a ratio, a percetnage, an indicator that tells you how successfully your CTA is in relative terms.

 

AFAIK that can't be done. I surf the forums here and there and the devs are aware of this but again, I don't think it's been fixed. I use google sheets to query analytics and connect it to data studio. A bit tedious, but works.

 

Cheers!

Please help - Seemingly Impossible calculated field

Participant ✭ ✭ ☆
# 7
Participant ✭ ✭ ☆

What's your data source? If it's Google Analytics, then your best bet is Patrick's suggestion below. If it's Google Sheets, then you could set up your data differently so that the clicks and links displayed are in separate columns. That would allow you to easily create a new % metric. 

Please help - Seemingly Impossible calculated field

Visitor ✭ ✭ ✭
# 8
Visitor ✭ ✭ ✭

But how do you do that to update automatically?

 

As I said above I do it in Google Sheets

Please help - Seemingly Impossible calculated field

Participant ✭ ✭ ☆
# 9
Participant ✭ ✭ ☆

Have you used SuperMetrics? There is a small monthly fee (I pay about $53/month), but I can set up reports so they update on a schedule, and then that feeds into DS.

Please help - Seemingly Impossible calculated field

Visitor ✭ ✭ ✭
# 10
Visitor ✭ ✭ ✭

Hi all, wondering if there has been any update on this problem?

Simple way to calculate CTRs in DataStudio based on GA data?... Sounds like a pretty basic requirement from this type of product.

 

Thanks,

Roee.