Forum Discussion

sffc's avatar
sffc
Helper I
4 years ago
Solved

Custom Column Nested IF Statements Replace Values

Any thoughts on how to accomplish this?  I need to create a custom column to filter down existing values that are aliases into my company name, but then need keep the rest of the company name values in the table the same as they are today.  I can't not have a closing else statement, so is there something I can use as the ending clause to essentially say, do nothing with everything else..  

if Text.Contains([#"Manufacturer"], "myCompany") then "myCompany"
else if Text.Contains([#"Manufacturer"], "otherName") then "myCompany"
else if Text.Contains([#"Manufacturer"], "secondName") then "myCompany"
else //I don't want to do anything here and need to keep the rest of the values that exist in the table as they are