Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
cristianml
Post Prodigy
Post Prodigy

Replace multiple string values query editor

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"}),

 

cristianml_0-1665519588585.png

 

I need to replace the following strings with "China":

 

"China/Hong Kong"

"China/Mainland"

"China/Taiwan"

 

Any ideas ?

 

 

Thanks !!

1 ACCEPTED SOLUTION
v-xiaosun-msft
Community Support
Community Support

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.

vxiaosunmsft_0-1665735794676.png

Or you can create custom columns. If you want to replace all areas related to China with "China", please use "contain".

vxiaosunmsft_1-1665735922670.png

 

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.

View solution in original post

2 REPLIES 2
v-xiaosun-msft
Community Support
Community Support

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.

vxiaosunmsft_0-1665735794676.png

Or you can create custom columns. If you want to replace all areas related to China with "China", please use "contain".

vxiaosunmsft_1-1665735922670.png

 

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.

amitchandak
Super User
Super User

@cristianml , I think you have to do that operation three times. of with help Text.Contains create a new column

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.