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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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

@Anonymous , You can use text.remove in power query and use id condition to control

https://docs.microsoft.com/en-us/powerquery-m/text-remove

 

In dax you can use

https://docs.microsoft.com/en-us/dax/replace-function-dax

https://docs.microsoft.com/en-us/dax/substitute-function-dax

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Greg_Deckler
Community Champion
Community Champion

@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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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