Forum Discussion
Anonymous
5 years agoNot applicable
Query Editor - replace multiple values
Hello - Our ERP system captures input for who took an order....but the input is the person's initials. I have about 40 of these two change....but don't want a giant list of "Replaced Value" in...
- Anonymous5 years ago
Hi Anonymous ,
How about creating a custom column using if else function?
if [initials] = "GB" then "GREG BROWN" else if [initials] = "CD" then "CHARLIE DAVIS" else ""Best Regards,
Jay
vivekhn
4 years agoAdvocate I
Hello,
You can use the if else statements to replace multiple categories in a single power query replace value formula.
For example, If you have a status column with the values A,I,T and wish to replace them with Active, Inactive, and Terminated use the formula provided below.
= Table.ReplaceValue(
#"Filtered Rows",
each [Status],
each if [Status] = "A" then "Active" else if [Status] = "I" then "Inactive" else "Terminated",
Replacer.ReplaceValue,{"Status"}
)