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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Pulling out the letter out of string

Dear All,

 

I need to pull out the letter out of string data in column: 

For example from 5SNA 075065G0323 I need pull out "G", from 5SNA 0800N330100 "N", 5SLD 1200J450350 "J" etc.

I have checked the similar cases in this forum, but unfortunately my string does not have gaps between the figures to make an easy extract, maybe there is another way. Can you please give a hint?

 

Thanks in advance!

 

 

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@Anonymous 

Add the following column in Power Query:

 = Text.End(Text.TrimEnd([Column1],List.Transform({0..9}, each Number.ToText(_))),1)


Your table looks like this before adding the column

Fowmy_0-1597068602239.png

Result

Fowmy_1-1597068629347.png

 

________________________

Did I answer your question? Mark this post as a solution, this will help others!.

Click on the Thumbs-Up icon on the right if you like this reply 🙂

YouTube, LinkedIn

 


 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

I think I wrote a bit confusingly, I need to pull the mentioned letters and have them in a separate colum accordingly

@Anonymous 

Did you check my solution?
It gives you the letters in a separate column.

________________________

Did I answer your question? Mark this post as a solution, this will help others!.

Click on the Thumbs-Up icon on the right if you like this reply 🙂

YouTube, LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Fowmy
Super User
Super User

@Anonymous 

Add the following column in Power Query:

 = Text.End(Text.TrimEnd([Column1],List.Transform({0..9}, each Number.ToText(_))),1)


Your table looks like this before adding the column

Fowmy_0-1597068602239.png

Result

Fowmy_1-1597068629347.png

 

________________________

Did I answer your question? Mark this post as a solution, this will help others!.

Click on the Thumbs-Up icon on the right if you like this reply 🙂

YouTube, LinkedIn

 


 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

amitchandak
Super User
Super User

Greg_Deckler
Super User
Super User

@Anonymous  - Perhaps split based upon space into two columns. Remove all alpha characters from second column. Splice them back together.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors