Forum Discussion
dlopez
6 years agoAdvocate II
Replace entire column text value
Hi, I want to replace values in a text column but matching only entire values. That is, I want to match "CAPITAL FED" but not "CAPITAL FEDERAL" (it's Spanish 😉) I tried to use Transform > Replace...
- 6 years ago
dlopez ,
Can you give some example of it? I tried here the option to Match entire cell contents, it worked.
Have you tried clean/trim this column before the replace ?
camargos88
6 years agoCommunity Champion
dlopez ,
Can you give some example of it? I tried here the option to Match entire cell contents, it worked.
Have you tried clean/trim this column before the replace ?
dlopez
6 years agoAdvocate II
You are right.
I didn't realize the the strings have trailing spaces. That's why "Match entire cell contents" did not match anything.
From the point of view of the code, I insist that the documentation about Replacer.ReplaceValue (https://docs.microsoft.com/en-us/powerquery-m/replacer-functions) is not clear at all.
Regards