Forum Discussion
Floriankx
8 years agoSolution Sage
Power Query - Replace multiple substrings in one column
Hello, I am looking for a solution to replace multiple substrings at once. For Example: Category Category after AA_A AB_A aa_B AB_B AA_C AB_C BB_A DE_A BB_B DE_B BB_C...
- 8 years ago
Hi Floriankx,
Here are some blogs written about multiple replacements of words with Power Query:
Multiple replacements or translations in Power BI and Power Query
Multiple replacements of words in Power Query
Replace multiple values in a single step
Regards,
Yuliana Gu
Anonymous
6 years agoNot applicable
Hi, Floriankx
Try the following M formula in Query Editor:
Text.Combine( List.ReplaceMatchingItems(
Text.Split ([Category], ”_“), { {“AA”, “AB”} , {“aa”, ”AB“} , {“BB” , “DE” } }
))
Here is more information to assist you:
https://www.syntelli.com/easy-guide-to-bulk-replace-values-in-power-bi-or-power-query
Let me know if it works!