Table.AlternateRows
语法
Table.AlternateRows(table as table, offset as number, skip as number, take as number) as table
关于
保留初始偏移量,然后交替选取和跳过下列行。
table
:输入表。offset
:要在开始迭代前保留的行数。skip
:要在每次迭代中删除的行数。take
:要在每次迭代中保留的行数。
示例 1
从表中创建一个表,从第一行开始,跳过 1 个值,然后保留 1 个值。
使用情况
Table.AlternateRows(
Table.FromRecords({
[CustomerID = 1, Name = "Bob", Phone = "123-4567"],
[CustomerID = 2, Name = "Jim", Phone = "987-6543"],
[CustomerID = 3, Name = "Paul", Phone = "543-7890"]
}),
1,
1,
1
)
输出
Table.FromRecords({
[CustomerID = 1, Name = "Bob", Phone = "123-4567"],
[CustomerID = 3, Name = "Paul", Phone = "543-7890"]
})