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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Grabbing a product number from a cluster of text and then adding it to a new column

Hi, I have received this data set, and I can't seem to wrap my mind around how to extract the value inside the bracket [] (see example below) and add it to a new column.

 

Some points to note. The BB-xxxx phrase I want is always bracketed, and the cell always starts with AA followed by [BB-xxxx]

 

As is  To be  
TextAmount TextNumberAmount
AA [BB-12345] Test184 AA [BB-12345] Test1BB-1234584
AA [BB-123425] Test2834 AA [BB-123425] Test2BB-123425834
AA [BB-1345] Test384 AA [BB-1345] Test3BB-134584
AA [BB-18345] Test483 AA [BB-18345] Test4BB-1834583
AA [BB-912345] Test585 AA [BB-912345] Test5BB-91234585

 

I hope someone is able to help me!

Thanks in advance!

1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @Anonymous ,

 

Select your [Text] column in Power Query, go to the Add Column Tab > Extract (dropdown) > Text Between Delimiters.

Start Delimiter = [

End Delimiter = ]

 

This should do what you need it to.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

2 REPLIES 2
BA_Pete
Super User
Super User

Hi @Anonymous ,

 

Select your [Text] column in Power Query, go to the Add Column Tab > Extract (dropdown) > Text Between Delimiters.

Start Delimiter = [

End Delimiter = ]

 

This should do what you need it to.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Anonymous
Not applicable

Thanks a lot, Pete!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.

Top Kudoed Authors