- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Printer Friendly Page
Conditional pageview help
November
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Email to a Friend
- Report Abuse
Hello,
I'd like to find out the number of pageviews for a given page, say page-a.
I've read https://support.google.com/datastudio/answer/7359285?hl=en and figured that I need a conditional calculated field in Data Studio.
The closest that I could get is
Pageviews * MAX(CASE WHEN REGEXP_MATCH(Page, '.*/page-a.*') THEN 1 ELSE 0 END)
I understand that the above statement returns me the total Pageviews instead of the Pageviews that contatins /page-a.
When I try to debug the statement with
MAX(CASE WHEN REGEXP_MATCH(Page, '.*/page-a.*') THEN Pageviews ELSE 0 END)
I get an error.
Can anyone point me in the right direction to get this working please?
Conditional pageview help
November
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Email to a Friend
- Report Abuse
Unfortunately you can't do this sort of thing in Data Studio. Instead use a filter to see the Pageviews for just the pages that match your condition.
Conditional pageview help
November
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Email to a Friend
- Report Abuse
Thank you for your reply Sian. My intention was to use the conditional calculated field as a Scorecard to represent a percentage of my funnel.
E.g. using a 3 step funnel, I was planning to have conditional calculated fields to do the following:
funnel step 1, page-a Pageviews / page-a Pageviews (which gives me 100%)
funnel step 2, page-b Pageviews / page-a Pageviews
funnel step 3, page-c Pageviews / page-b Pageviews