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
jhoyabel19
Helper I
Helper I

Remove Text in a specific Column

Hi,
Need help, how to remove the Ms, Mr, Ms. Miss in some of the names of this column in Power Query? Thank you

 

1 ACCEPTED SOLUTION
Mikelytics
Resident Rockstar
Resident Rockstar

Hi @jhoyabel19 

 

Please fo the following

Mikelytics_0-1673449337117.pngMikelytics_1-1673449365757.pngPlease also make sure to use a space behind Ms or Mrs.

 

Best regards
Michael
-----------------------------------------------------
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Appreciate your thumbs up!
@ me in replies or I'll lose your thread.

 

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!

View solution in original post

6 REPLIES 6
Mikelytics
Resident Rockstar
Resident Rockstar

Hi @jhoyabel19 

 

I also built a more lean solution. with an Added Column.

Mikelytics_0-1673450054297.png

if Text.StartsWith([Column1],"Mr ") or Text.StartsWith([Column1],"Mrs ") or Text.StartsWith([Column1],"Ms ") then Text.AfterDelimiter([Column1], " ") else [Column1]

 

Best regards
Michael
-----------------------------------------------------
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Appreciate your thumbs up!
@ me in replies or I'll lose your thread.

 

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!

Mike,

Thanks for this solution.  Is there a way to add a search in a table with common prefixs? I'd rather automate the replacements based upon the everchange master data set.   I have a dataset that includes DR, dr DRS. Mrs, Miss, Ms, MS, Deacon, Dcn and other combinations. I can compile a list form the data using splitter to find the most prevelant prefixes. The list looks like: 

 

Name.1              Count   Title Made

Sister12Sr.
Sr137Sr.
Sr.32Sr.
Ms35Ms.
Ms.23Ms.
Mrs141Mrs.
Mrs.97Mrs.
Mr15Mr.
Mr.12Mr.
Miss12Miss
Rev8Father
Dr12Dr.
Dr.15Dr.
Deacon3Deacon
 5B
Alexandra5B
Alexandria3B

Hi,

Could you share some data and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Mikelytics
Resident Rockstar
Resident Rockstar

Hi @jhoyabel19 

 

Please fo the following

Mikelytics_0-1673449337117.pngMikelytics_1-1673449365757.pngPlease also make sure to use a space behind Ms or Mrs.

 

Best regards
Michael
-----------------------------------------------------
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Appreciate your thumbs up!
@ me in replies or I'll lose your thread.

 

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!

Thank you so much for the help.

@jhoyabel19  Awesome! Thank you for your feedback! 🙂

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!

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.