Table.AlternateRows
Table.AlternateRows( table as table, offset as number, skip as number, take as number) as table
保留初始偏移量,然后交替选取和跳过下列行。
table
: 输入表。offset
: 在开始迭代之前要保留的行数。skip
: 每次迭代中要删除的行数。take
: 每次迭代中要保留的行数。
示例:
从表中创建一个表,从第一行开始,跳过 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"]})