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
qmestu
Helper III
Helper III

Connections between tables using date intervals

Hi,

 

I have a dataset in which i need to connect two tables using date fields. However, these are intervals, such as "START_DATE" and "END_DATE". A simplified example would be:

 

table 1:

start_dateend_datevalue
1/1/20221/6/2022A
31/6/202231/12/2022B

 

table 2:

start_dateend_datecorrespondent_value
1/3/20221/4/2022X
31/9/202230/11/2022Y

 

Choosing a slicer with the A value would result in the corresponding value being X. How can i connect these two tables?

 

Thanks.

1 ACCEPTED SOLUTION
v-jianboli-msft
Community Support
Community Support

Hi @qmestu ,

 

Please try:

Apply the measure to the visual level's filter:

Measure = IF(SELECTEDVALUE('Table 2'[start_date])>=MIN('Table 1'[start_date])&&SELECTEDVALUE('Table 2'[end_date])<=MAX('Table 1'[end_date]),1)

vjianbolimsft_0-1689831917705.png

Final output:

vjianbolimsft_1-1689831930484.png

Best Regards,

Jianbo Li

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

View solution in original post

2 REPLIES 2
v-jianboli-msft
Community Support
Community Support

Hi @qmestu ,

 

Please try:

Apply the measure to the visual level's filter:

Measure = IF(SELECTEDVALUE('Table 2'[start_date])>=MIN('Table 1'[start_date])&&SELECTEDVALUE('Table 2'[end_date])<=MAX('Table 1'[end_date]),1)

vjianbolimsft_0-1689831917705.png

Final output:

vjianbolimsft_1-1689831930484.png

Best Regards,

Jianbo Li

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

lbendlin
Super User
Super User

There be dragons. What should happen when multiple intervals from Table 2 match your selection from table 1?  What if the use selects multiple entries from table 1?

 

Please consider all possible scenarios and then provide sample data that fully covers them all.

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.

Top Solution Authors