No Skip Function in Power Apps? Here’s How to Use LastN Instead

Power Apps doesn’t have a built-in skip function, so I researched how to retrieve array or table data while skipping the first N items.

スポンサーリンク

What I Want to Achieve

Let’s say we have an array like this and want to retrieve all items except for the first N items.
An array of items in Power Apps showing items that we want to skip

Using LastN as a Substitute for the Missing Skip Function

Since Power Apps doesn’t have a built-in skip function, we can use the LastN function as a workaround.
Example of using LastN function in Power Apps to simulate a skip function
LastN([Table (array)], CountRows([Table (array)]) - [Number to skip])
Using this expression, we can retrieve an array that skips the first N items (in this example, 6 items).
Screenshot showing the LastN function used to skip the first 6 items in an array

Therefore, when you need to retrieve an array excluding the first N items in Power Apps, use the LastN function as a substitute for the missing skip function.

Bonus: How to Get the First N Items

As a bonus, if you want to retrieve just the first N items, you can use the FirstN function.
Screenshot demonstrating the FirstN function to retrieve the first several items in an array

コメント

Copied title and URL