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

Get Fabric certified for FREE! Don't miss your chance! Learn more

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
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.