Table.TransformRows
Generates a list by executing the transform operation on each individual row in a table.
Convert the rows of a table into a list of numbers using the following Power Query M code:
MTable.TransformRows(
Table.FromRecords({
[a = 1],
[a = 2],
[a = 3],
[a = 4],
[a = 5]
}),
each [a]
)
The output will be:
{1, 2, 3, 4, 5}
To transform the rows of a numeric table into textual records, use this Power Query M code:
MTable.TransformRows(
Table.FromRecords({
[a = 1],
[a = 2],
[a = 3],
[a = 4],
[a = 5]
}),
(row) as record => [B = Number.ToText(row[a])]
)
The output will be:
{
[B = "1"],
[B = "2"],
[B = "3"],
[B = "4"],
[B = "5"]
}