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

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
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.

Top Solution Authors
Top Kudoed Authors