cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
iingemann
New Member

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 @iingemann ,

 

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 @iingemann ,

 

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!




Thanks a lot, Pete!

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

BizApps LATAM 2023

Business Application LATAM Summit 2023

Join the biggest FREE Business Applications Event in LATAM this February.

Power Platform Bootcamp

Global Power Platform Bootcamp

In this bootcamp we will deep-dive into Microsoft’s Power Platform stack with hands-on sessions and labs, delivered to you by experts and community leaders.

Top Solution Authors
Top Kudoed Authors