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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Replace multiple words simultaneously in M Query

Hi there

 

I have a 'Comments' column and I want to remove about 70 words to clean it up. I am loath to use replace, because it creates 70 steps and takes ages. 

I have found Table.TransformColumnTypes combined with Text.Remove (see below syntax) but this only replaces single characters, not words. 

= Table.TransformColumns(PreviousStep,{{"Text Comments", each Text.Remove(_,{})}})

 

Is there a function I can apply to my table, or some other fancy way, within M Query (I know about word clouds) that I can do this?

 

Jemma 🙂 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable
5 REPLIES 5
negi007
Community Champion
Community Champion

@Anonymous will it be possible for you to share the input or output you are expecting from your data. Please share data in text format so that we can do the testing at our end and suggest a solution to you. 




Did I answer your question? Mark my post as a solution!
Appreciate your Kudos



Proud to be a Super User!


Follow me on linkedin

VijayP
Super User
Super User

@Anonymous can you share one or two examples




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Anonymous
Not applicable

VijayP
Super User
Super User

@Anonymous 

Try using add column from example and try to give few examples to train power query to remove respective words ! may be you need to give few examples 4 to 5. Let me know if you are able to do that!




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Anonymous
Not applicable

Sorry @VijayP no chance. The text is too detailed, example column gets instantly confused and tries to transform the whole sentence.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.