Table.ExpandTableColumn
Syntaxis
Table.ExpandTableColumn(table as table, column as text, columnNames as list, optional newColumnNames as nullable list) as table
Over
Hiermee worden tabellen in table
[column
] uitgebreid naar meerdere rijen en kolommen.
columnNames
wordt gebruikt om de kolommen te selecteren die u uit de binnenste tabel wilt uitvouwen. Geef newColumnNames
op om conflicten tussen bestaande kolommen en nieuwe kolommen te voorkomen.
Voorbeeld 1
Vouw tabelkolommen in [a]
in de tabel ({[t = {[a=1, b=2, c=3], [a=2,b=4,c=6]}, b = 2]})
uit in drie kolommen [t.a]
, [t.b]
en [t.c]
.
Gebruik
Table.ExpandTableColumn(
Table.FromRecords({
[
t = Table.FromRecords({
[a = 1, b = 2, c = 3],
[a = 2, b = 4, c = 6]
}),
b = 2
]
}),
"t",
{"a", "b", "c"},
{"t.a", "t.b", "t.c"}
)
uitvoer
Table.FromRecords({
[t.a = 1, t.b = 2, t.c = 3, b = 2],
[t.a = 2, t.b = 4, t.c = 6, b = 2]
})