Forum Discussion
Alicia_Anderson
6 years agoResolver I
How to merge two tables based on a partial match
I have two tables each with one column: Release Table [Release] & Release CID Table [Release CID]. I want to associate Release CID to Release based on whether there is a exact match first and if no...
- 6 years ago
Hi Alicia_Anderson ,
my code included the small letter L "l" and not 1.
The reason for your error message is that you used a number instead.
So either replacing it with any character or a string like Jimmy801 mentioned should solve the problem.
BTW: It might be more suitable for your use case to use the "Text.StartWith"- function instead of the "Text.Contains"-function.
ImkeF
6 years agoCommunity Champion
Thanks, appreciated.
Please add a column with the following formula:
List.First(
List.Select(
List.Buffer(
Table.Buffer(
Table.Sort(#"Release CID Table",
{{"Length", Order.Descending}}) )
[Release CID Table] ),
(l) => Text.Contains( [Release Table], l))
)
ImkeF
6 years agoCommunity Champion
… or you can sort the lookup table before, see attached file