Date table with FilterWeek, FilterMonth and FilterYear ( (...) , -3, -2 , previous year, current year, next year, 1, 2, 3

I would like to create a date table column for filter week, month and year

Name would be:
FilterWeek --> ( (...) , -3, -2 , previous week, current week, next week, 1, 2, 3, (...) )
FilterMonth --> ( (...) , -3, -2 , previous month, current month, next month, 1, 2, 3, (...) ) FilterYear --> ( (...) , -3, -2 , previous year, current year, next year, 1, 2, 3, (...) )

I want to use these columns in PowerBI as a filter option. I have seen it before, but cannot find examples of this code. I have not enough experience to build this yet.

There are 2 famous guys in a cube you should check, I think this video is close to what you are looking for:

1 Like

I can also recommand Alberto Ferrari, from sqlbi.com:

Thanks Rogier! I love these guys. He gave a link voor SQL as well. Perfect!