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

Create a custom dimension that specifies a dimension by a time frame

Follower ✭ ☆ ☆
# 1
Follower ✭ ☆ ☆

Hey,

 

I'm trying to create a custom dimension that specifies a dimension by a time frame, e.g. Clicks/Impressions/Transactions that occurred last year.

 

I want to plot this years & last years data on a graph without using the compare to "Previous Year/Period" option which doesn't allow me to change the colours of each series or make one year a bar chart.

 

My current code that I'm using is:

 

CASE
WHEN REGEXP_MATCH (Transactions, Date >= "20160101" AND Date <= "20112231") THEN "Previous Sales"
END

 

This doesn't work & I'm sure there is some obvious error with the code, does anyone have any ideas?

Thanks for your help,

Sam

 

Create a custom dimension that specifies a dimension by a time frame

Follower ✭ ☆ ☆
# 2
Follower ✭ ☆ ☆

Is it not possible to do this?