How to Create a List of Numbers in Power Apps with Sequence
Sequence makes a table of numbers. Sequence(5) gives 1, 2, 3, 4 and 5; give it a start and a step, and Sequence(288, 0, 5) counts every five minutes of a day, from 0 to 1,435. Together with ForAll, it builds lists such as every time of day for a drop-down.
The example is the Overtime Timesheet app, which uses Sequence to build its list of start and finish times.
Syntax
Sequence(Records [, Start [, Step]])
| Argument | Meaning | Default |
|---|---|---|
| Records | How many numbers to make, from 0 to 50,000 | required |
| Start | The first number | 1 |
| Step | How much each number adds to the one before; negative counts down | 1 |
The result is a table with one column, named Value (Sequence function).
Prerequisites
- Any canvas app, and a text control to see results in (How to Add a Text Control in Power Apps).
A table can't be shown in a text control as it is, so each example joins the numbers into text with Concat (How to Join Table Values into Text in Power Apps with Concat). I put each formula into a text control's Text for a moment; Studio's preview strip, under the formula bar, shows the result.
Example 1: Count from 1
Concat(Sequence(5), Value, ", ")
Sequence(5) starts at 1 and adds 1, five times:

Example 2: Choose the Start and the Step
Concat(Sequence(6, 0, 5), Value, ", ")
Six numbers, starting at 0, each 5 more than the last:

Example 3: Every Five Minutes of a Day
A day has 1,440 minutes, so every five minutes is 288 numbers: 0, 5, 10 and so on up to 1,435.
CountRows(Sequence(288, 0, 5))

The example app turns those minutes into times of day with ForAll: How to Build a Table in Power Apps with ForAll.
Common Mistakes
| Mistake | What happens | Do this instead |
|---|---|---|
Expecting Sequence(5) to start at 0 | It starts at 1 | Pass a start: Sequence(5, 0) |
| Reading a column called anything but Value | The column doesn't exist | Use Value |
| Putting the table straight into a text control's Text | A table isn't text | Join it with Concat, or count it |
| Asking for more than 50,000 numbers | Microsoft's limit is 50,000 records | Keep Records within 0 to 50,000 |
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| One number too few or too many | Records is the count, not the last number | 0 to 1,435 every 5 is 288 numbers |
| An empty table | Records rounds down to 0, such as 0.9 | Use a whole number |
| The numbers go the wrong way | Step is negative | Use a positive step to count up |
FAQ
What is Sequence used for?
Microsoft's reference pairs it with ForAll to repeat something a number of times, or to turn numbers into other values, such as the next ten days with DateAdd.
Can the step be a decimal?
Yes. Microsoft's examples include Sequence(4, -100, 0.5).
Conclusion
Sequence(Records, Start, Step) makes a one-column table, Value, of evenly spaced numbers: Sequence(288, 0, 5) is every five minutes of a day, ready for ForAll to turn into times.
Additional Resources
- Sequence function: syntax, the 50,000-record limit and examples.
- ForAll function: turning each number into another value.
