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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Dates table outside slicer selection

Hello everyone.

Probably simple solution but I'm struggling with getting dates outside slicer selection.
I've got one table showing slicer's dates, but I need another one with extended dates.
For instatnce:
I've one week chooosen from slicer.
In the 2nd table I need to display week before, selected week and next week dates.
How should I deal with that?

VAR _CurrentStartDate = MIN('Calendar'[Date])
VAR _CurrentEndDate = MAX('Calendar'[Date])
VAR _period = DATEDIFF(_CurrentStartDate, _CurrentEndDate,DAY) + 1
Thank you in advance!


sliecerDates.png

 

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@Anonymous 

If I understood your question correctly, you need to have an additional dates table to have the desired result. Create a measure to filter the Extended table Viz as follows:

Fowmy_0-1678020694737.png

ExtendedDateFiter = 
VAR __DATEMIN = MIN('Dates'[Date])
VAR __DATEMAX = MAX('Dates'[Date])
VAR __DATEEXT = SELECTEDVALUE('Dates Extended'[Date])
VAR __RESULT = 
INT(
    __DATEEXT >= __DATEMIN - 7 &&
    __DATEEXT <= __DATEMAX + 7
)
RETURN
    __RESULT

File is attached.

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

@Fowmy 
You understood my question correctly 🙂

I have got now my 2nd table as expected.
Thank you very much for your help!

NamedPeriods.png

 

Fowmy
Super User
Super User

@Anonymous 

If I understood your question correctly, you need to have an additional dates table to have the desired result. Create a measure to filter the Extended table Viz as follows:

Fowmy_0-1678020694737.png

ExtendedDateFiter = 
VAR __DATEMIN = MIN('Dates'[Date])
VAR __DATEMAX = MAX('Dates'[Date])
VAR __DATEEXT = SELECTEDVALUE('Dates Extended'[Date])
VAR __RESULT = 
INT(
    __DATEEXT >= __DATEMIN - 7 &&
    __DATEEXT <= __DATEMAX + 7
)
RETURN
    __RESULT

File is attached.

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.