SOLVED

Power Query - Lookup value between dates in a separate table

New Contributor

I have two tables in Power Query that have no relationships between them. 

 

Main Table

DateTeamQtyCY

6/1/2022

A1100 
7/15/2021B1200 
8/30/2022B2300 

 

Contract Year

ContractYearStartEnd

CY-3

7/1/20226/30/2023
CY-27/1/20216/30/2022
CY-17/1/2020

6/30/2021

 

I want to check the Date in the Main Table against the Start and End dates in the Contract Year table and return the appropriate ContractYear back into a column in the Main Table. 

 

I've looked at multiple posts on the same topic and each version I try creates a cyclic relationship. 

 

Thanks in advance.

3 Replies
best response confirmed by probey (New Contributor)
Solution

@probey 

Maybe like in the attached file with Power Query.

power query base tables.JPGpower query result table.JPG

@Quadruple_Pawn That was perfect and really simple. Thank you.