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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! 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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.

Top Solution Authors