Table.SplitColumnTable.SplitColumn

SintaxeSyntax

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

SobreAbout

Divide as colunas especificadas em um conjunto de colunas adicionais usando a função de divisão especificada.Splits the specified columns into a set of additional columns using the specified splitter function.

Exemplo 1Example 1

Divida a coluna [Name] em duas na posição do "i"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
CustomerIDCustomerID Name.1Name.1 Name.2Name.2 TelefonePhone
11 BobBob 123-4567123-4567
22 JJ mm 987-6543987-6543
33 PaulPaul 543-7890543-7890
44 CrCr STst 232-1550232-1550