Compare current week, same week in last month and same week in last year

Hi, I am new to quick sight and i have below problem to solve, could you please help.
I have an order date and order count columns, i want to plot this to a vertical bar chart. And in each bar i want to show the aggregation of order counts in current week, same week in last month and same week in last year (up to last 7 weeks) (This is to help the customers to compare the data based on week)
Could you please help me to achieve this.

Hi @Ren
maybe you can have a look at:

and

BR

@ErikG thanks for the reply. I already tried the method in first link
It works for me in case of day, I can plot current day, same day in last week and same day in last month
using below formulas
PeriodOverPeriodLastValue(sum({order_count}), {Date (Period)}, WEEK, 1)
PeriodOverPeriodLastValue(sum({order_count}), {Date (Period)}, MONTH, 1)

But couldn’t understand how we can use the same method in case of WEEK,
I want the current week, same week in last month and same week in last year

depends on the time span (as parameter) selected (DAY, MONTH, etc…) this calculated filed changes - Date (Period
ifelse(
${SelectedTimeSpan}=‘DAY’,truncDate(“DD”,{order_date}),
${SelectedTimeSpan}=‘WEEK’,truncDate(“WK”,{order_date}),
${SelectedTimeSpan}=‘MONTH’,truncDate(“MM”,{order_date}),
truncDate(“YYYY”,{order_date}))

I couldn’t achieve what i wanted by changing the granularity and offset in period function in case of WEEK.

Any help on the above issue is very much appreciable, since I am stuck here.

@Ren -
This should get you same week last year:
periodOverPeriodLastValue(sum(Sales), {Order Date},WEEK, 52)

Not sure how you want to calculate same week last month, but if you want to go 4 weeks back you could do this:
periodOverPeriodLastValue(sum(Sales), {Order Date},WEEK, 4)

@Kellie_Burton thanks for the reply
I could do the year case as you mentioned.
But in case of week, for example if it is 2nd week of current month I want to compare it with last month 2nd week. If there is no such week number in last month, get the data of last week.