It is common to compare sales, revenue, and so on, from a week this year, to the same week in previous years. Let’s say you want to compare last week to the same week last year. There are two ways to accomplish this:
Weeks Starting on Monday
If you are using Looker’s default weeks starting on Monday, you can do this easily, by creating a matches(advanced) filter on date for:
1 week ago for 1 week, 53 weeks ago for 1 week
This will give you something like this:
Weeks Not Starting on Monday
If you want to analyze weeks that start on a day other than Monday, you can do this with a matches(advanced) filter on date as well.
For example, if you want weeks that start on Sunday, you can use:
sunday - 7 days for 7 days, sunday - 371 days for 7 days
If you want your week to start on a different day, replace '
sunday' with the day you want the week to start.
In this case, you will likely also want to create a week-starting-Sunday dimension. Read about how to do this here.