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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
mpml
Frequent Visitor

Surfacing values between two dates based on selected value...

Hi, I have the following basic tables:

Table 1:

Title | Release Date

 

Table 2:

Release Date | Corridor Start Date | Corridor End Date

 

Release Dates are obviously connected by a 1 to many relationship. I want to be able to use a slicer to select 1 Title, but then in a visual I want to surface any Title that has a Release Date between Corridor Start Date and Corridor End Date.

 

I'm trying to create a measure that would flag a Title if it shows up between the Start and End Date values, but I'm struggling to do so. I believe if I can do that then I could edit interactions for the original Title slicer to not filter the new visual, and instead use the measure as a filter in the new visual.

 

Any help is appreciated!

3 REPLIES 3
AllisonKennedy
Super User
Super User

@mpml  You don't need a relationship between the two tables, since you're looking for dates that fall between the range, you need an approximate lookup. See if this blog helps: https://excelwithallison.blogspot.com/2020/06/dax-approximate-lookup.html Instead of Min and Max Sales, you'll use Corridor Start Date and Corridor End Date. 

 

Also, for future data models, always use a date table for dates: https://excelwithallison.blogspot.com/2020/04/dimdate-what-why-and-how.html 


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

I'm not sure if I explained myself all that well - but I appreciate the links! Do you mind reading my clarifications and seeing if you have any additional resources or suggestions for me?

 

My goal is to have a bar chart with TITLE on the x-axis, and PERCENT VALUE as the bars. But I only want a TITLE to surface if it has a RELEASE FRIDAY (date) between CORRIDOR START and CORRIDOR END of the TITLE release date.

 

I have a slicer set up where users select a single TITLE so as to surface specific key metrics on this page in other visuals related to that specific selected TITLE. 

 

Tables:

TITLE | RELEASE FRIDAY (so a bunch of titles with matching release fridays, we have a bunch of other meta data columns in here as well but trying to keep it simple)

 

TITLE | PERCENT VALUE (this is a separate table because we actually have multiple metrics in here so we don't want to have to repeat all the meta data from the other TITLE table)

 

RELEASE FRIDAY | CORRIDOR START | CORRIDOR END (perhaps this is unnecessary... could I potentially use the filter function to only return TITLEs if RELEASE FRIDAY is between the selected RELEASE FRIDAY (via TITLE slicer) minus 8 days and RELEASE FRIDAY plus 8 days?)

So essentially, there are multiple TITLES for each RELEASE FRIDAY. User selects one TITLE via a slicer, and the bar chart would update to show every TITLE (including selected) with a RELEASE FRIDAY either 1 week before, on the same day, or 1 week after.

Hi @mpml ,

 

Would you please show us some sample data by onedrive for business? I can't understand your well just through your long string of text descriptions. We need some sample data to help us understand your requirement. 

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.