-1

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

j93
  • 1
  • 2
  • Could you elaborate by providing a publicly editable Google Data Studio Report (additionally, a Google Sheet if it's the data set) of the scenario (using sample data that shows 1) Input values (~10 rows) 2) Expected output 3) An attempt at solving the issue)? It would help users visualise the issue and test out suggestions on a specific use case with objective right / wrong answers. Without a [Minimal Reproducible Example](https://stackoverflow.com/help/minimal-reproducible-example) it would be difficult to pinpoint a suggestion and the issue, e.g. Data Set, Data Source, Report, Fields, Chart – Nimantha Feb 15 '22 at 04:32

1 Answers1

-1

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.

kstat
  • 160
  • 4