AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

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

New calculated dimension issue

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

A bit of background:

I have a Google Analytics property where in the "Page" report I have basically all of my search results pages. They've been formatted nicely like so:

/search-results/a|b|c|d|e|...z

so that all search parameters correspond to a letter between the pipes. One of these parameters is a date (DD/MM/YYYY).

I'm trying to use this date (text type for now) to create a new dimension in Data Studio so I make a new field "CalcDate" and set the formula as

REGEXP_EXTRACT(Page, '[0-9]{2}/[0-9]{2}/[0-9]{4}')

But when I go to create a chart with CalcDate and Pageviews CalcDate just shows as "null".

 

In Analytics, I can do a "Matching RegExp" search of `[0-9]{2}/[0-9]{2}/[0-9]{4}` and the correct pages are returned, I don't understand why this is not working in data studio?

 

I'll be happy to provide sample data if needed. Any help will be appreciated!

New calculated dimension issue

Explorer ✭ ✭ ☆
# 2
Explorer ✭ ✭ ☆

Hi Tom, 

 

Can you provide me sample data and a screenshot of your chart? 

I will test with your formula and i will look what's wrong. 

I think that you need to do something else after in the goal that your field will be recognized as date.