Click here to Skip to main content
15,887,083 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
I have a Power Bi Project, I have 2 tables, the first T1 has Column1 with Values edited wrongly, the values are for example:

ss 1222---
Wkl8888
er -7777
1222 gf6
st. 8566
gh8888--

The second table T2 has the correct values (which are already a subtext from T1.Column1) in T2.column1

1222
8888
7777
8566

I want for each row in T1, to search the T2.column1 column,
if the value in T1.column1 includes a value from T2.column1, I want to replace it with the value from T2.column1, if the search in T2.column1 completed with no match, it returns the same value of T1.Column1 or null, I tried many things but I keep getting:

Expression.Error: A cyclic reference was encountered during evaluation.

this is the last code I tried after creating a custom column in T1

What I have tried:

= Table.AddColumn(#"Changed Type", "Custom", each List.First(
    List.Transform(
        T2[Column1],
        each if Text.Contains(T1[ts1111f]{[12]}, _) then _ else null
    )
))
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900