List.Split
A list cut into pages of a set size.
Group: List. Power Query M has it too: a query that uses it is written as in Power BI.
Syntax
List.Split(list as list, pageSize as number) as list
| Parameter | Type | Description |
|---|---|---|
list | list | The list. |
pageSize | number | How many items a page holds. |
Returns
list. A list of lists; the last page may be shorter.
Examples
Batches of two orders
List.Split({1001, 1002, 1003, 1004, 1005}, 2)
{{1001, 1002}, {1003, 1004}, {1005}}