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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Pandadev
Post Prodigy
Post Prodigy

Remove text from column based on another column in same table

I have a table imported daily from the web and it contains two columns , one is name and address and the other is just address

I need to extract just the name from the address , by a formula to remove what is in the address column from the name address column

Name Address                                                                    Addresss

John Smith Johns Beach Bar , Miami , US                           Johns Beach Bar , Miami , US

Mike Brown Mikes Beach Bar , Florida , US                        Mikes Beach Bar , Florida , US

 

I need a Name Column adding which just shows the name 

John Smith

Mike Brown

 

I need to do this in query editor please

1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @Pandadev,

Did you mean to remove the 'text string' stored in the 'address' column from the 'name address' field? If that is the case, you can create a calculated column with SUBSTITUTE function:

Replaced = SUBSTITUTE([Name Address],[Addresss],"")

9.png

Regards,

Xiaoxin Sheng

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

HI @Pandadev,

Did you mean to remove the 'text string' stored in the 'address' column from the 'name address' field? If that is the case, you can create a calculated column with SUBSTITUTE function:

Replaced = SUBSTITUTE([Name Address],[Addresss],"")

9.png

Regards,

Xiaoxin Sheng

Anonymous
Not applicable


@Pandadev  you can make use of below measure

extract name = LEFT('Table'[Name Address  ],LEN('Table'[Name Address  ])-LEN('Table'[Addresss])))

Regards
Husna
amitchandak
Super User
Super User

@Pandadev , is that name will be the first two words?

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

unfortunately not , sometimes it can be like

Smith, Arnold James

John & Mary Smith

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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