Table.Repeat is a Power Query M function that repeats the rows in a table a specified number of times. The function returns a new table with the rows repeated according to the given count.
Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365
Syntax
Table.Repeat(
table as table,
count as number,
) as table
Description
Table.Repeat repeats the rows of the tables a specified number of times. It returns a table with the rows from the input table
repeated the specified count
times.
Examples
Repeat the rows in the table two times.
Table.Repeat(
Table.FromRecords( {
[a = 1, b = "hello"],
[a = 3, b = "world"]
} ),
2
)
/* Output:
Table.FromRecords( {
[a = 1, b = "hello"],
[a = 3, b = "world"],
[a = 1, b = "hello"],
[a = 3, b = "world"]
} )
*/
Related functions
Other functions related to Table.Repeat are:
- Table.AlternateRows
- Table.Distinct
- Table.InsertRows
- Table.Range
- Table.RemoveFirstN
- Table.RemoveLastN
- Table.RemoveMatchingRows
- Table.RemoveRows
- Table.Skip
2023-2024 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy