Forum Discussion
park
4 years agoFrequent Visitor
Moving values to a new column based on another column
Hi. Consider the situation. I have column CompanyName that are associated with rows of another coumn called Type. These are "Chain" ,"NF", "FF", and "DF" CompanyName Type Walmart Chai...
- 4 years ago
Hi park ,
The above code won't work with approximate matches. Try this one instead:
Here the code:
if Text.Contains([CompanyName], "Publix") or Text.Contains([CompanyName], "Costco") then "Chain" else [Type]
Hope this helps 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
tackytechtom
Most Valuable Professional
4 years agoHi park ,
This should work for as many arguments. Please keep in mind that someone needs to update that code in case new companies are added. A better way would probably be to fix that data issue in the source itself (just saying 🙂 )
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
park
4 years agoFrequent Visitor
Thank you for the solution. This works great ! 🙂
Is this argument case sensitive as well? If so, is there a way to get around?