Data Studio
5.1K members online now
5.1K members online now
Ask questions about Data Studio
Guide Me
star_border
Reply

REGEXP_REPLACE() returns always "could not parse the formula'

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi all,

 

Somebody knows how to solve it? I need to extract and to concat Year and Month from my field called 'Dates'. Their values are in format '7/5/2017 11:09:04 AM', for example.

 

My new calculate field:

 

 

CONCAT(REGEXP_MATCH(Dates, '^\d{1,2}/\d{1,2}/(\d{4}).*'), REGEXP_MATCH(Dates, '^(\d{1,2})/\d{1,2}/\d{4}.*')

REGEXP_REPLACE() returns always "could not parse the formula'

Participant ✭ ✭ ☆
# 2
Participant ✭ ✭ ☆

What's your data source? If it's Sheets, it might be easier to do in the Sheet with a concatenate formula.

REGEXP_REPLACE() returns always "could not parse the formula'

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Dates is a custom dimension from Google Analytics. I need this custom field to integrate it into my datastudio dashboard.

REGEXP_REPLACE() returns always "could not parse the formula'

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭

Hi, the function REGEXP_MATCH() only returns the values ​​"true" or "false".

 

You need use:

 

CONCAT(REGEXP_EXTRACT(Dates, '^\d{1,2}/\d{1,2}/(\d{4}).*'), REGEXP_EXTRACT(Dates, '^(\d{1,2})/\d{1,2}/\d{4}.*')

REGEXP_REPLACE() returns always "could not parse the formula'

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

Data Studio could not parse this formula.