List.Reverse

List

Returns a new list with the elements in reverse order.

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

Syntax

List.Reverse(list as list) as list

Parameters

NameTypeRequiredDescription
listlistYesThe list to reverse.

Return Value

listA new list with elements in reverse order.

Remarks

List.Reverse returns a new list with the elements in reversed order. The original list is not modified. The function has no parameters beyond the list itself and always reverses the entire list.

A common use case is reversing the result of a sort: List.Sort produces ascending order by default, and List.Reverse on the result gives descending order. However, for descending sorts it is more efficient and readable to pass Order.Descending directly to List.Sort. Use List.Reverse when you need to reverse for other reasons — for example, processing a timeline from newest to oldest, or displaying a ranked list in reverse order.

List.Reverse can also be used as a building block in more complex transformations: for example, to read a list from the end without knowing its length, or to mirror a sequence.

Examples

Example 1: Reverse a list of numbers

List.Reverse({1, 2, 3, 4, 5})
Result
Result
1{5, 4, 3, 2, 1}

Example 2: Reverse a sorted list to get descending order

let
    Values = {3, 1, 4, 1, 5, 9, 2, 6},
    Sorted = List.Sort(Values),
    Descending = List.Reverse(Sorted)
in
    Descending
Applied Steps

The final output — the list of integers sorted in descending order.

Result
1{9, 6, 5, 4, 3, 2, 1, 1}

Example 3: Reverse a list of text items

List.Reverse({"First", "Second", "Third", "Fourth"})
Result
Result
1{Fourth, Third, Second, First}

Compatibility

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