Share via


Table.ExpandListColumn

Sözdizimi

Table.ExpandListColumn(table as table, column as text) as table

Hakkında

table Değer listesi içeren bir yer verüldüğündecolumn, listeyi her değer için bir satıra böler. Diğer sütunlardaki değerler, oluşturulan her yeni satırda yinelenir. Bu işlev, iç içe tabloları kayıt listesi olarak kabul ederek de genişletebilir.

Örnek 1

[Ad] liste sütununu bölün.

Kullanım

Table.ExpandListColumn(
    Table.FromRecords({[Name = {"Bob", "Jim", "Paul"}, Discount = .15]}),
    "Name"
)

Çıktı

Table.FromRecords({
    [Name = "Bob", Discount = 0.15],
    [Name = "Jim", Discount = 0.15],
    [Name = "Paul", Discount = 0.15]
})

Örnek 2

[Components] iç içe tablo sütununu bölün.

Kullanım

Table.ExpandListColumn(
    #table(
        {"Part", "Components"},
        {
            {"Tool", #table({"Name", "Quantity"}, {{"Thingamajig", 2}, {"Widget", 3}})}
        }
    ),
    "Components"
)

Çıktı

Table.FromRecords({
    [Part = "Tool", Components = [Name = "Thingamajig", Quantity = 2]],
    [Part = "Tool", Components = [Name = "Widget", Quantity = 3]]
})