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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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.


Follow on LinkedIn
@ 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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors