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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Split Column to separate digits and characters all stored as data type 'TEXT'

Hello,

I have a column that contains username and employee code all stored in format 'Text'. I wish to separate username and employee code to different column so that I can build relation to another datasets.

 

Username are all characters and employee codes are all digits.

 

Could you help me how to achieve?

 

 

5 REPLIES 5
Greg_Deckler
Community Champion
Community Champion

Sample data? Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



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...
Anonymous
Not applicable

Adding Sample data,

Data,

Login IDs
abc
def
ghi
123
456
789
jkl
987
654
mno
pqr

 

Expected Outcome.

Login IDsUsernameEmployee Code
abcabcnull
defdefnull
ghighinull
123null123
456null456
789null789
jkljklnull
987null987
654null654
mnomnonull
pqrpqrnull

 

Previous recommended action,
Sample.gif

Hope this helps to understand the query.

Can you check the below link

 

https://community.powerbi.com/t5/Desktop/Split-column-based-on-text-and-numerical-characters/td-p/13...

 

To get null values you have define it in add custom columns.

 

 

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





rajendraongole1
Super User
Super User

In power Query , we have option in transform tab with split column there can you can segregate by Nondigit to Digit.

 

Just check the option we can seperate both text data and digit data with seperate column.

if it clears the problem Please mark it as solution.

 

Thanks

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Anonymous
Not applicable

thanks @rajendraongole1 

 

tried with this formula

 

= Table.SplitColumn(#"Renamed Columns1", "LOGIN ID", Splitter.SplitTextByCharacterTransition({"0".."9"}, (c) => not List.Contains({"0".."9"}, c)), {"LOGIN ID.1", "LOGIN ID.2"})

 

but the result for LOGIN ID.2 is null completely.

Presume it could be because username are all charaters and employee code are all digits?

Note : the Entire column is in Text Format.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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