I connect datastudio with BigQuery. I try to use user functions in BigQuery and past personal Query in datastudio, but user functions ( CREATE TEMP FUNCTION
) is not supported in datastudio. Then I try use new non calculated field with categories, but something wrong:
CASE WHEN REGEXP_MATCH(campaign, '*-Moskva-*','*-moskva-*') THEN 'Москва' ELSE 'other' END
Error: Invalid formula
It could be achieved using either of the following CASE
statements:
1) WHEN campaign
Contains -Moskva-
or -moskva-
THEN Москва
CASE
WHEN REGEXP_MATCH(campaign, ".*(-[Mm]oskva-).*") THEN "Москва"
ELSE "other"
END
2) WHEN campaign
Contains Moskva
or moskva
THEN Москва
CASE
WHEN REGEXP_MATCH(campaign, ".*([Mm]oskva).*") THEN "Москва"
ELSE "other"
END
Created a Google Data Studio Report and GIF to elaborate:
I connect datastudio with BigQuery. I try to use user functions in BigQuery and past personal Query in datastudio, but user functions (CREATE TEMP FUNCTION) is not supported in datastudio. Then I try use new non calculated field with categories, but something wrong:
CASE WHEN REGEXP_MATCH(campaign, '*-Moskva-*','*-moskva-*') THEN 'Москва' ELSE 'other' END
Error: Invalid formula
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.