構文
Table.ExpandTableColumn(
table as table,
column as text,
columnNames as list,
optional newColumnNames as nullable list
) as table
バージョン情報
table[column] 内のテーブルを複数の行と列に展開します。
columnNames は、内部テーブルから展開する列を選択するために使用されます。 既存の列と新しい列の間の競合を回避するには、 newColumnNames を指定します。
例 1
テーブル内の [a] のテーブル列を展開 ({[t = {[a=1, b=2, c=3], [a=2,b=4,c=6]}, b = 2]}) 、 [t.a]、 [t.b] 、 [t.c]の 3 つの列に展開します。
使用方法
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"}
)
アウトプット
Table.FromRecords({
[t.a = 1, t.b = 2, t.c = 3, b = 2],
[t.a = 2, t.b = 4, t.c = 6, b = 2]
})