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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

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.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.