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

Custom time frame

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi, I am looking for a possibility to create a custom time frame in Data Studio, i.e. I would like to be able to report data over the four weeks before the last two weeks (or, formulated differently: a report showing data from the last six weeks excluding the last two weeks). Is there any way to achieve this?

1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Tom K
August 2017

Custom time frame

Participant ✭ ✭ ☆
# 2
Participant ✭ ✭ ☆

Where is your data coming from?

 

There's no built in way to do this in Data Studio. However, if your data is in Sheets, then you could probably build a formula in Sheets that identifies if the date is from that period (Y/N toggle). Then you just need to apply a filter for the Y values in your DS chart, and it will restrict to that range. Not a clean workaround, but doable. 

 

If you're in GA or something directly streamed, I'm not sure if you could build a CASE statement or not. I'm not well versed, so perhaps someone else could chime in. 

View solution in original post

Marked as Best Answer.
Solution
Accepted by topic author Tom K
August 2017

Custom time frame

Participant ✭ ✭ ☆
# 2
Participant ✭ ✭ ☆

Where is your data coming from?

 

There's no built in way to do this in Data Studio. However, if your data is in Sheets, then you could probably build a formula in Sheets that identifies if the date is from that period (Y/N toggle). Then you just need to apply a filter for the Y values in your DS chart, and it will restrict to that range. Not a clean workaround, but doable. 

 

If you're in GA or something directly streamed, I'm not sure if you could build a CASE statement or not. I'm not well versed, so perhaps someone else could chime in. 

Custom time frame

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

The data is coming from Sheets, so your suggestion is a very doable workaround, until there is a way to achieve this via the built-in time frame selector without having to apply a filter to tables.

Like you suggested, I now check if a date is equal to or later than today minus 42 days, and before or equal to today minus 14 days. Based on that result, I set a value "In time frame" to Y or N. In Data Studio, I filter the data based on "In time frame" is equal to "Y".