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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. 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
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors
Top Kudoed Authors