Table.SelectRows
選取符合條件函數的資料列。
Syntax
Table.SelectRows(
table as table,
condition as function
) as table
Remarks
傳回 table 中符合選取範圍 condition 的資料列資料表。
Examples
Example #1
在資料表中選取 [CustomerID] 資料行中的值大於 2 的資料列。
Table.SelectRows(
Table.FromRecords({
[CustomerID = 1, Name = "Bob", Phone = "123-4567"],
[CustomerID = 2, Name = "Jim", Phone = "987-6543"],
[CustomerID = 3, Name = "Paul", Phone = "543-7890"],
[CustomerID = 4, Name = "Ringo", Phone = "232-1550"]
}),
each [CustomerID] > 2
)
Result:
Table.FromRecords({
[CustomerID = 3, Name = "Paul", Phone = "543-7890"],
[CustomerID = 4, Name = "Ringo", Phone = "232-1550"]
})