List.Repeat

List

Returns a list created by repeating the given list a specified number of times.

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

Syntax

List.Repeat(list as list, count as number) as list

Parameters

NameTypeRequiredDescription
listlistYesThe list to repeat.
countnumberYesThe number of times to repeat the list.

Return Value

listA new list that is the source list concatenated with itself count times.

Remarks

List.Repeat concatenates the input list with itself count times, producing a longer list of repeated elements. The result has List.Count(list) * count elements, in the same order as the original repeated count times.

This function is useful for creating repeating label patterns (e.g., Q1, Q2, Q3, Q4 repeating across years), generating cyclic sequences, or padding a structure to a required length. For adding a single repeated value n times, pass a single-element list: List.Repeat({value}, n).

count must be a non-negative integer. Passing 0 returns an empty list; passing 1 returns a copy of the original list. For combining two different lists into one, use List.Combine instead.

Examples

Example 1: Repeat a list 3 times

List.Repeat({1, 2, 3}, 3)
Result
Result
1{1, 2, 3, 1, 2, 3, 1, 2, 3}

Example 2: Create a repeating pattern of labels

List.Repeat({"Q1", "Q2", "Q3", "Q4"}, 3)
Result
Result
1{Q1, Q2, Q3, Q4, Q1, Q2, Q3, Q4, Q1, Q2, Q3, Q4}

Example 3: Pad a list with a repeated filler value

let
    FillerList = List.Repeat({null}, 5)
in
    FillerList
Result
Result
1{null, null, null, null, null}

Compatibility

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