Forum Discussion
ErisedAlurem
4 years agoFrequent Visitor
Using a custom function in Text.ReplaceValue
I made a post earlier (deleted it because I meneged to solve it myself) about a custom function that I was trying to create to use in Text.ReplaceValue (in the replacer as function argument). From wh...
- 4 years ago
Hi ErisedAlurem ,
Please try the code.
= Table.ReplaceValue(#"Changed Type", each Text.Split([Base], ";"), each Text.Split([Retorno], ";"), (x,y,z) => functionTest(x,y,z,0), {"Retorno"})If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
lbendlin
4 years agoSuper User
Couple of comments
- You can keep using Replacer.ReplaceValue and put your logic into the third parameter of Table.ReplaceValue
- if you want to replace Replacer.ReplaceValue with a function be aware that it expects three parameters, not four. The meaning of the parameters is slightly different from what you describe
(x,y,z) => if x then z else y.