How to use absweek and absmonth to get previous week/month
I've got some case statements in my analytics query that I want to return something different based on a date being last week or last month. I can do this week or this month using absweek() and absmonth(). if i do these -1 though it just removes a day form the date. I can -7 to get last week but for last month there isn't a constant number that will work. Does anyone know a way of using these functions to identify last week or last month please?
e.g.
case when absweek (today()) = absweek(deals."Sold Date") then 1 else 0 end as 'This Week Sale'
case when absweek (today()-7) = absweek(deals."Sold Date"-7) then 1 else 0 end as 'Last Week Sale'