Analytics
6.2K members online now
Understand information in your reports and troubleshoot reporting issues such as self-referrals, (not set) data, and inaccurate information
 
Guide Me
star_border
Reply

Google Sheets Add-On Compare Rolling Date Range

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I'd like to compare the last N days with the previous N day period using the Google Sheets Add-On.

 

I can pull one report with the "Last N Days" value as 7, but I don't know how to pull a report for the previous 7 day period. Is there a way to do this?

 

Everything I've tried gets the following error message: Invalid value '7:7daysAgo'. Values must match the following regular expression: '[0-9]{4}-[0-9]{2}-[0-9]{2}|today|yesterday|[0-9]+(daysAgo)'

 

I've also experimented with entering the start date as "14(daysAgo)" and end date as "7(daysAgo)" but still get the same error.

 

Any ideas?

1 Expert replyverified_user

Re: Google Sheets Add-On Compare Rolling Date Range

Rising Star
# 2
Rising Star

You were almost there - try 14daysAgo without the brackets.Screen Shot 2017-05-18 at 09.14.21.png

 

 

 

John Wedderburn, Advertiser Community, Rising Star
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here.

Google Sheets Add-On Compare Rolling Date Range

Rising Star
# 3
Rising Star

Another thing - you can also use the google spreadsheet functions to achieve the same effect, which has the advantage that you actually see the dates being used. i.e.start date =today()-14 and end date =today()-7.

Being able to use functions like this in your queries increases the opportunities for extracting more complex data.

John Wedderburn, Advertiser Community, Rising Star
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here.