跳到主要内容

Table.Repeat

对表行重复指定的次数。

Syntax

Table.Repeat(
table as table,
count as number
) as table

Remarks

从输入 table 返回一个表,其中的列重复了指定的 count 次。

Examples

Example #1

对表中的行重复两次。

Table.Repeat(
Table.FromRecords({
[a = 1, b = "hello"],
[a = 3, b = "world"]
}),
2
)

Result:

Table.FromRecords({
[a = 1, b = "hello"],
[a = 3, b = "world"],
[a = 1, b = "hello"],
[a = 3, b = "world"]
})

Category

Table.Row operations