訓練
模組
Create formulas that use tables, records, and collections in a canvas app in Power Apps - Training
Do you have need for complex formulas in your app? This module can help you write those formulas.
Table.FirstN(table as table, countOrCondition as any) as table
根據 countOrCondition
的值,傳回資料表 table
的第一個資料列:
countOrCondition
是數字,則會傳回多個資料列 (從頂端開始)。countOrCondition
是條件,則會傳回符合該條件的資料列,直到資料列不符合條件為止。找出資料表的前兩個資料列。
使用方式
Table.FirstN(
Table.FromRecords({
[CustomerID = 1, Name = "Bob", Phone = "123-4567"],
[CustomerID = 2, Name = "Jim", Phone = "987-6543"],
[CustomerID = 3, Name = "Paul", Phone = "543-7890"]
}),
2
)
輸出
Table.FromRecords({
[CustomerID = 1, Name = "Bob", Phone = "123-4567"],
[CustomerID = 2, Name = "Jim", Phone = "987-6543"]
})
找出資料表中 [a] > 0 的前幾個資料列。
使用方式
Table.FirstN(
Table.FromRecords({
[a = 1, b = 2],
[a = 3, b = 4],
[a = -5, b = -6]
}),
each [a] > 0
)
輸出
Table.FromRecords({
[a = 1, b = 2],
[a = 3, b = 4]
})
訓練
模組
Create formulas that use tables, records, and collections in a canvas app in Power Apps - Training
Do you have need for complex formulas in your app? This module can help you write those formulas.