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.
I agree that this is much easier to do in the Query Editor. A robust way to extra numbers (or any desired characters) from a text string is to use Text.Select(). For example, you can add a column with a formula like this:
=Text.Select([ColumnWithText], {"0".. "9"})
The curly brackets create a list of the numbers from 0 to 9. Only those characters will be extracted. You can add other lists of desired characters too. Note that if you have two separate number strings within the text, this formula would put them together (may be good or bad for what you are trying to do).
If this works for you, please mark it as the solution.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
@Anonymous
The best option is to work on Edit Query.
Replace your letter P, R into single delimiter. For example ","
Then you can split column using a custom delimiter. https://www.tutorialgateway.org/how-to-split-columns-in-power-bi/
Another option- using DAX calculated column
Val =
var _p=FIND("P",'Table (2)'[Column],1,0)
var _r=FIND("R",'Table (2)'[Column],1,0)
var _s= IF(_p<>0,_p,_r)
var _blank=FIND(" ",'Table (2)'[Column],1,0)
var result= VALUE(LEFT(RIGHT('Table (2)'[Column],LEN('Table (2)'[Column])-_s),_blank))
return result
Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 🙂
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 |
---|---|
14 | |
9 | |
7 | |
7 | |
6 |
User | Count |
---|---|
21 | |
11 | |
10 | |
9 | |
8 |