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
Lawrenceiow
3 years agoAdvocate I
Text.Replace is case sensitive.
Text.Replace([Category],"AA","AB")To make the three replacements you can nest it.
Text.Replace(Text.Replace(Text.Replace([Category],"BB","DE"),"aa","AB"),"AA","AB")