構文
Table.TransformRows(table as table, transform as function) as list
バージョン情報
tableの各行にtransform操作を適用して、listを作成します。
例 1
テーブルの行を数値の一覧に変換します。
使用方法
Table.TransformRows(
Table.FromRecords({
[a = 1],
[a = 2],
[a = 3],
[a = 4],
[a = 5]
}),
each [a]
)
アウトプット
{1, 2, 3, 4, 5}
例 2
数値テーブルの行をテキスト レコードに変換します。
使用方法
Table.TransformRows(
Table.FromRecords({
[a = 1],
[a = 2],
[a = 3],
[a = 4],
[a = 5]
}),
(row) as record => [B = Number.ToText(row[a])]
)
アウトプット
{
[B = "1"],
[B = "2"],
[B = "3"],
[B = "4"],
[B = "5"]
}