Why is Data Studio not aggregating the data?

1.6k Views Asked by At

I am trying to visualize in Data Studio the number of user sessions with a certain landing page. I cannot use a filter because I don't want to filter the whole table. To this end, I created a calculated field which assigns a value of 1 if the page path is the one I want else 0...

case when landing_page = "xyz" then 1 else 0 end

However, when I select this as a metric in my table, it returns only 1's and 0's, i.e., it's not summing up the yes values... Can you help please? Thanks

1

There are 1 best solutions below

0
kstat On

Make sure the metric aggregation is set to SUM and not COUNT DISTINCT.

Also, using that formula, you're basically creating a filter because the other landing pages will show 0 for user sessions.