This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowJuly 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more
Hi,
I want to replace multiple strings values from a column in one single step in query editor.
I tried the following but is not working:
#"Replaced China/Hong Kong" = Table.ReplaceValue(#"Removed Errors",
each [Country] = "China/Hong Kong","China",
[Country] = "China/Mainland","China",
[Country] = "China/Taiwan","China",
Replacer.ReplaceText,{"Country/Location"}),
I need to replace the following strings with "China":
"China/Hong Kong"
"China/Mainland"
"China/Taiwan"
Any ideas ?
Thanks !!
Solved! Go to Solution.
Hi @cristianml ,
According to your description, here is my solution.
It cannot work if you replace multiple different values in a column at the same time. You can use "repalce value" three times in advanced editor.
Or you can create custom columns. If you want to replace all areas related to China with "China", please use "contain".
Best Regards,
Community Support Team _ xiaosun
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @cristianml ,
According to your description, here is my solution.
It cannot work if you replace multiple different values in a column at the same time. You can use "repalce value" three times in advanced editor.
Or you can create custom columns. If you want to replace all areas related to China with "China", please use "contain".
Best Regards,
Community Support Team _ xiaosun
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@cristianml , I think you have to do that operation three times. of with help Text.Contains create a new column
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
| User | Count |
|---|---|
| 27 | |
| 22 | |
| 20 | |
| 18 | |
| 14 |
| User | Count |
|---|---|
| 23 | |
| 20 | |
| 20 | |
| 20 | |
| 20 |