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
Nivedhana
Helper I
Helper I

Split Alphanumeric column into 2

We have a column capturing data in below format. Is it possible to split the text and numbers in 2 different columns in power query editor?

 

ABC
1
2

Bhy

3

2 ACCEPTED SOLUTIONS
AlienSx
Super User
Super User

    r = Table.TransformColumns(
        Source, 
        {"ABC", (x) => 
            [num = try Number.From(x) otherwise null,
            txt = if num = null then x else null]}
    ),
    expand = Table.ExpandRecordColumn(r, "ABC", {"num", "txt"})

View solution in original post

slorin
Super User
Super User

Hi,

 

Another solution

= Table.SplitColumn(
Source,
"ABC",
(x) => if Value.Is(x, type number) then {x,null} else {null,x},
{"Num", "Text"}
)

Stéphane 

View solution in original post

3 REPLIES 3
slorin
Super User
Super User

Hi,

 

Another solution

= Table.SplitColumn(
Source,
"ABC",
(x) => if Value.Is(x, type number) then {x,null} else {null,x},
{"Num", "Text"}
)

Stéphane 

Thank you very much!! It worked!

AlienSx
Super User
Super User

    r = Table.TransformColumns(
        Source, 
        {"ABC", (x) => 
            [num = try Number.From(x) otherwise null,
            txt = if num = null then x else null]}
    ),
    expand = Table.ExpandRecordColumn(r, "ABC", {"num", "txt"})

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.