List.Generate

Syntax

List.Generate(initial as function, condition as function, next as function, optional selector as nullable function) as list

Description

Generates a list of values given four functions that generate the initial value initial, test against a condition condition, and if successful select the result and generate the next value next. An optional parameter, selector, may also be specified.

Reference Data

https://docs.microsoft.com/en-us/powerquery-m/power-query-m-function-reference

Power Query M Functions / List Functions / List.Generate