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
2K members online now
2K members online now
Ask questions about Data Studio
Guide Me
star_border
Reply

MySQL Calculated Field

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi All, 

 

I'm trying to create a table using MySQL as a datasource. The database is updated monthly with new information that is appended to the end of the database. Each row in the database has several columns of data and a column for a timestamp from when it was created/added. I would like to create a calculated field that is the previous month's number so that I can see the same dimension across multiple months. What I would like to do is create something like this. I'm trying to figure out a calculated field formula for the first 3 Metrics. Open to suggestions of other ways to solve this general issue. 

 

Screenshot.png 

MySQL Calculated Field

Follower ✭ ✭ ✭
# 2
Follower ✭ ✭ ✭

Currently, I don't think is possible as there is no Today() function hence is hard to get the calculated field to do what you want.

 

For now, the quickest way is to do it in MySQL.

MySQL Calculated Field

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Thanks, 

 

Do you know how I could go about this in MySQL?