Forum Discussion

DanielCooper's avatar
DanielCooper
Regular Visitor
3 years ago
Solved

Conditional replace text based on if the value is present in another column in the same row

Hi,   I'm having trouble using the Table.ReplaceValue function with a condition.    I want to replace the values in one field (Print), with the values in another field (REPLACE Print), but only i...
  • jennratten's avatar
    3 years ago

    Hello!  Please give this a try...

    = Table.ReplaceValue(#"Previous Step Name", each [Print], each [REPLACE Print] ?? [Print], Replacer.ReplaceValue,{"Print"})

    This statement says exactly what you are trying to do.  The other difference between it and your script is that you had the replacer function as Replacer.ReplaceText (partial value) instead of Replacer.ReplaceValue (entire value).

    BEFORE:

     

    AFTER: