Forum Discussion
lnayak
4 years agoFrequent Visitor
Replace multiple values in one step using DAX
Hi All, I have a company column with multiple common text ending with "Ltd", "Limited", "Inc", "Ltd.", "Company". I want to create a single DAX function to remove/replace these text with blank an...
Anonymous
4 years agoNot applicable
Here's a good tutorial: https://www.howtoexcel.org/bulk-replace-values/
Edit: Just noticed: The Tutorial is for M replace. With Dax you can https://dax.guide/replace/ or
https://dax.guide/substitute/
- lnayak4 years agoFrequent Visitor
I tried above one but it looks like I need to hard code each value is '<old text> to replace and get the output with a replaced text.
= Table.ReplaceValue(#"Replaced Value","LIMITED","",Replacer.ReplaceText,{"Supplier - Clean"})
= Table.ReplaceValue(#"Added Custom2","Ltd","",Replacer.ReplaceText,{"Supplier - Clean"})
Can i get a solution to club in all items to be replaced {"LIMITED", "Ltd"} into one and to replace with {" ", " "} all at once.
Many Thanks,