Forum Discussion

probey's avatar
probey
Copper Contributor
Oct 24, 2022
Solved

Power Query - Lookup value between dates in a separate table

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.

Resources