Table.Repeat
Stacks copies of a table's rows below each other, as many copies as you ask for.
Group: Table. Power Query M has it too: a query that uses it is written as in Power BI.
Syntax
Table.Repeat(table as table, count as number) as table
| Parameter | Type | Description |
|---|---|---|
table | table | The rows to copy. |
count | number | How many copies; 0 gives a table with no rows. |
Returns
table. The rows, once per copy, in their order each time.
Examples
Three rounds of two products
Table.Repeat(#table({"Product"}, {{"Chair"}, {"Desk"}}), 3)
| Product |
|---|
| Chair |
| Desk |
| Chair |
| Desk |
| Chair |
| Desk |