Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
I would like to extract text from the input string and get the result provided in the output by using Power Query.
input:
hello bd AD-001234 hb
this is AD-3245
output:
AD-001234
AD-3245
Can anyone give me some tips? not using R?
Thank you
Solved! Go to Solution.
Create a Custom Column with this code
List.Select(Text.Split([input]," "), each Text.Contains( _ , "-")){0}
regards
Phil
Proud to be a Super User!
Hi,
What is basis of extraction? Everthing from AD till the next space? Please clarify.
Create a Custom Column with this code
List.Select(Text.Split([input]," "), each Text.Contains( _ , "-")){0}
regards
Phil
Proud to be a Super User!
Any way to add an if statement where if another column has a certain value then apply the extraction
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
71 | |
57 | |
38 | |
36 |
User | Count |
---|---|
82 | |
67 | |
61 | |
46 | |
45 |