Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

SWITCH with multiple between date filters

It should be simple, but somehow I cant figure it out. Trying to create a drop-down slicer that can select different week periods that overlap years, examples:

 

Week 40 - 20

Week 42 - 22

Week 45 - 25

 

So in the above example the returned data for "Week 40 - 20" should be between week 40 2020 and week 20 2021.

 

It cant be a calculated column, since the date can have multiple names. I'm using a basic date table that should have all thats required to reach my answer:

TKA_0-1626422865398.png

 

Its always last year + current year, so the measure should filter based on year+week. Perhaps a SWITCH formula isnt the way to go, but it initially made the most sense to me.

 

 

 

 

 

2 REPLIES 2
Anonymous
Not applicable

@amitchandak Im trying to create a dropdown slicer that has multiple options. Creating a calculated column would not work, because I want to be able to switch between multiple periods that overlap date. When I click on the slicer, I want the following (and more) options to choose from:

 

Week 40 - 20 (so week 40 2020 until week 20 2021)

Week 42 - 22 (week 42 2020 until week 22 2021)

Week 45 - 25 (week 45 2020 until week 25 2021)

 

These will be overlapping dates, so for example 2020/12/25 will fall under all 3 of the options above.

amitchandak
Super User
Super User

@Anonymous , if you are able to create this week in your date table then you should be able to filter? Not able to get the issue

 

Week text = "Week " & format(Weeknum([Date],2),"00") * format([Date], "YY")

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.