Use regex page to get all pageviews
I'm bulding a dashboard and having problems with metric customization, when I try to get a number of pageviews that have relation with one regex that returns me "Could not parse formula."
What I trying to do is that:
CASE WHEN REGEXP_MATCH(page,(.+\/p\/.+)) THEN SUM(pageviews) END
Does anyone already have this kind of problem?
Re: Use regex page to get all pageviews
Hi Felipe --
Looks like there are some problems with your CASE statement. You can see the documentation for that function here. I believe you need to address the following:
- You can't use a function like SUM() in the THEN clause
- You must include an ELSE clause (perhaps some like 'ELSE 0')
Assuming you fix these two problems and that your regex in the REGEXP_MATCH is correct then I think your calculated field should work well.