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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
ZachUnger
Helper I
Helper I

Extract multiple text

Hi Team 

 

I'm wondering if there is an easy way to extract anything starting with CRC or PE into a new column as per the picture below. 

Please note: some have multiple so I would need all of these possibly separated by a comma. 

ZachUnger_0-1706145819070.png

Any help appreciated 

Cheers 

Z

1 ACCEPTED SOLUTION
PijushRoy
Super User
Super User

Hi @ZachUnger 

In Power Query Editor, please create a custom column and use below code

Text.Combine(List.Select(Text.Split([#"PE (comments)"], " "), each Text.StartsWith(_, "CRC") or Text.StartsWith(_, "PE")), ", ")

 

PijushRoy_0-1706160033314.png

 

If your requirement is solved, please make sure to MARK AS SOLUTION ✔️ and help other users find the solution quickly. Please hit the LIKE 👍 button if this comment helps you.

Thanks
Pijush
www.MyAccountingTricks.com 
https://www.youtube.com/MyAccountingTricks

 




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





View solution in original post

4 REPLIES 4
ZachUnger
Helper I
Helper I

Thanks, PijushRoy. This has resolved the issue. 

You are welcome @ZachUnger 




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





PijushRoy
Super User
Super User

Hi @ZachUnger 

In Power Query Editor, please create a custom column and use below code

Text.Combine(List.Select(Text.Split([#"PE (comments)"], " "), each Text.StartsWith(_, "CRC") or Text.StartsWith(_, "PE")), ", ")

 

PijushRoy_0-1706160033314.png

 

If your requirement is solved, please make sure to MARK AS SOLUTION ✔️ and help other users find the solution quickly. Please hit the LIKE 👍 button if this comment helps you.

Thanks
Pijush
www.MyAccountingTricks.com 
https://www.youtube.com/MyAccountingTricks

 




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





danextian
Super User
Super User

Hi @ZachUnger ,

Please post a sample data that can be copy-pasted to Excel (not an image). Questions:

  1. Are PE and CRC case-sensitive?
  2. What if there are mutiple words that begin with those text strings? Say, two PEs and one CRC in one cell.
  3. Are the results going to be in the same row or each match has its own row?

 










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

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