Forum Discussion
probey
Oct 24, 2022Copper Contributor
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
Date | Team | Qty | CY |
6/1/2022 | A1 | 100 | |
7/15/2021 | B1 | 200 | |
8/30/2022 | B2 | 300 |
Contract Year
ContractYear | Start | End |
CY-3 | 7/1/2022 | 6/30/2023 |
CY-2 | 7/1/2021 | 6/30/2022 |
CY-1 | 7/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
- OliverScheurichGold Contributor
- probeyCopper Contributor
OliverScheurich That was perfect and really simple. Thank you.
- OliverScheurichGold ContributorYou are welcome.