u/Every-Yesterday-8868

▲ 4 r/GoogleDataStudio+1 crossposts

I'm using GA4 as my data source in Looker Studio and I have a table grouped by Campaign. I'm trying to add a column that shows the percentage of sessions that scrolled 50% of the page.

We track scroll depth via a custom GTM event that fires at 25%, 50%, 75% and 90% scroll depth. This event is pushed to GA4 with a `Scroll percentage` parameter containing the value (25, 50, 75 or 90). So in GA4/Looker Studio, `Scroll percentage` is an event parameter dimension.

I already have two scorecards that work fine:

- One showing total sessions

- One showing sessions with a chart-level filter on `Scroll percentage = 50`

But I can't get this to work as a calculated column in a table grouped by Campaign.

I already tried to create a calculated field with formula:

SUM(CASE WHEN Scroll percentage = "50" THEN 1 ELSE 0 END) / Sessions

But there it seems to always return 1 and then divide by sessions. It is not summing all sessions where Scroll percentage = 50.

reddit.com
u/Every-Yesterday-8868 — 2 months ago