Looker Calculated Metric Issue

I am trying to build a dashboard with data blended from Google Ads and GA4. In the dash, I have set it up as a left outer blend, with dimensions of ISO Week of ISO year joined to "week" to be able to aggregate the data by week, as well as session campaign joined to "campaign" to be able to filter by certain campaigns.

The issue arises whenever I add in a metric that is a calculated field. For example if I add in Click Through Rate (Clicks / Impressions) it doesn't calculate the clicks column / the impressions column that it is showing in the table, but instead calculates that individually for the 15 campaigns that are in my filter, and then depending on how I have those metrics set up (sum, average, etc) calculates the wrong value.

Is there a way I can code the calculated metric to take the total clicks and divide it by the total impressions for the campaigns I have filtered to in order for the math to be correct.

Thanks!

0 1 252
1 REPLY 1

I leave this here for anyone else, but I am just an idiot. You just need to alter to formula to sum the individual metrics when calculating. So instead of clicks/impressions its sum(clicks)/sum(impressions)