Table.SplitColumn

Syntax

Table.SplitColumn(table as table, sourceColumn as text, splitter as function, optional columnNamesOrNumber as any, optional default as any, optional extraColumns as any) as table

About

Splits the specified columns into a set of additional columns using the specified splitter function.

Example 1

Split the [Name] column at position of "i" into two columns

let 
    Customers = Table.FromRecords({
        [CustomerID = 1, Name = "Bob", Phone = "123-4567"],
        [CustomerID = 2, Name = "Jim", Phone = "987-6543"],
        [CustomerID = 3, Name = "Paul", Phone = "543-7890"],
        [CustomerID = 4, Name = "Cristina", Phone = "232-1550"]
    })
in
    Table.SplitColumn(Customers, "Name", Splitter.SplitTextByDelimiter("i"), 2
CustomerID Name.1 Name.2 Phone
1 Bob 123-4567
2 J m 987-6543
3 Paul 543-7890
4 Cr st 232-1550