When you use date part 'week' in a DATEDIFF calculation, it will count in corresponding increments.
So DATEDIFF('week',...) is going to count weeks, not days.
It works fine in your first statement with zero weeks difference, but in your second statement you're asking it to give you 364 weeks prior. If you change the -364 to -51 that should do it.
another way to get at this is through the datetrunc function
datetrunc('week',today()) returns the date of the first date of the week - so if datetrunc('week',[order date] ) = datetrunc('week',today()) then [Sales] end
will sum all the orders that happened this week - you can look at last week by using dateadd('year',-1,today()) to move the target week back 1 year and then place that in the datetrunc function above
if datetrunc('week',[order date] ) = datetrunc('week',dateadd('year',-1,today()))then [Sales] end
If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution. Thank you.