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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
Anonymous
Not applicable

Select current date and show custom periods

Greetins community!

 

I need some help with a report that i am developing.

 

The idea is te report always shows from the current date, the 2 weeks before the current date and the 2 weeks after the current date.

 

So far, I have generated the calendar dimension an tried using the relative date slicer, but this control only allows one of the two options., Is it possible to do this in power bi? 

 

 I'm looking for a way to answer this but without succes so far, any ideas?

 

The only alternative i have so far is to separate both results into different pages.

 

I already appreciate any ideas.

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , you have create a column like this in you date table and use that slicer. Assuming you have week name

 

Week Type = Switch( True(),
WEEKNUM(Date[Date] ) >= WEEKNUM( TODAY() ) -2 &&
WEEKNUM(Date[Date] ) <= WEEKNUM( TODAY() )+2,"Last 2 Week and next 2 week " ,
[Week Name]
)

 

use WEEKNUM(Date[Date],2 ) for monday week

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , you have create a column like this in you date table and use that slicer. Assuming you have week name

 

Week Type = Switch( True(),
WEEKNUM(Date[Date] ) >= WEEKNUM( TODAY() ) -2 &&
WEEKNUM(Date[Date] ) <= WEEKNUM( TODAY() )+2,"Last 2 Week and next 2 week " ,
[Week Name]
)

 

use WEEKNUM(Date[Date],2 ) for monday week

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Thanks! that's amazing!

Helpful resources

Announcements
Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

Top Solution Authors