List.Numbers
A list of numbers from a start, a set count of them, each a step from the last.
Group: List. Power Query M has it too: a query that uses it is written as in Power BI.
Syntax
List.Numbers(start as number, count as number, optional increment as nullable number) as list
| Parameter | Type | Description |
|---|---|---|
start | number | The first number. |
count | number | How many numbers. |
increment | nullable number optional | The step between numbers; 1 when left out. It may be negative or a fraction. |
Returns
list. The numbers.
Remarks
{1..5}writes the same list asList.Numbers(1, 5)when the step is 1.
Examples
Four order numbers
List.Numbers(1001, 4)
{1001, 1002, 1003, 1004}
Discount steps of a quarter
List.Numbers(0, 5, 0.25)
{0, 0.25, 0.5, 0.75, 1}