# Power Apps SEQUENCE Function

Description

The SEQUENCE function creates a range of numbers as a single column table. This could be a continuous range like the numbers from 1-to-100 or non-continuous range such as [2, 4, 6, 8 10]. Ranges of dates and letters can be produced as well.

Syntax

Sequence(records, start, step)

• records – Required. Quantity of numbers in the sequence.
• start – Optional. Starting number of the sequence. Default is 1.
• step – Optional. Incremental value. Default is 1

Examples

Numbers

A table with all numbers from 1-to-10

``Sequence(10)``

A table with all multiples of 10 from 0-to-100

``Sequence(10, 0, 10)``

A table with numbers from 10-to-1

``Sequence(10, 10, -1)``

Letters

A table of all letters A-to-Z

``ForAll(Sequence(26, 65, 1), Cha\'r(Value))``

Dates

A table of the next 7 days starting 2020-01-01

``ForAll(Sequence(7), Date(2020, 1, Value))``

A table of the next 5 Saturdays starts 2020-01-04

``ForAll(Sequence(5, 4, 7), Date(2020, 1, Value))``

A table of the first day of each month in the year 2020

``ForAll(Sequence(12), Date(2020, Value, 1))``

A table of the last day of each month in the year 2020

``ForAll(Sequence(12), DateAdd(Date(2020, Value, 1), 1, Months) - 1)``

A table of all of the days in the month of January for the year 2020

``ForAll(Sequence(Day(DateAdd(Date(2020, 1, 1), 1, Months)-1), 1, 1), Date(2020, 1, Value))``

Random

A random number between 1-and-100

``First(Shuffle(Sequence(1, 100, 1))).Value``