List.Split

List

Splits a list into a list of sub-lists, each of a specified maximum size.

Examples on this page use shared sample tables. View them to understand the input data before reading the examples below.

Syntax

List.Split(list as list, pageSize as number) as list

Parameters

NameTypeRequiredDescription
listlistYesThe source list to split.
pageSizenumberYesThe maximum number of items in each sub-list (chunk size).

Return Value

listA list of lists, where each inner list contains at most pageSize items.

Remarks

List.Split divides a list into consecutive chunks (sub-lists), each containing at most pageSize items. If the list length is not evenly divisible by pageSize, the last chunk contains the remaining items and will be smaller than pageSize. The result is always a list of lists — never a flat list.

This function is the standard way to implement batching in Power Query. Common use cases include splitting a large list of IDs to send in multiple API requests, chunking a dataset for incremental processing, or paginating through records. After splitting, use List.Transform or List.Accumulate to process each batch.

The pageSize must be a positive integer; using 0 or a negative number causes an error. If the source list is empty, the result is an empty list. To flatten a list of lists back into a single list, use List.Combine.

Examples

Example 1: Split into chunks of 3

List.Split({1, 2, 3, 4, 5, 6, 7, 8, 9}, 3)
Result
Result
1{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}

Example 2: Last chunk may be smaller

List.Split({1, 2, 3, 4, 5}, 2)
Result
Result
1{{1, 2}, {3, 4}, {5}}

Example 3: Process a list in batches of 100

let
    AllIDs = List.Numbers(1, 250),
    Batches = List.Split(AllIDs, 100),
    BatchCount = List.Count(Batches)
in
    BatchCount
Applied Steps

The final output — the scalar count 3, representing the number of batches produced.

Result
13

Compatibility

Power BI Desktop Power BI Service Excel Desktop Excel Online Dataflows Fabric Notebooks