Table.ReverseRows

This function produces a table that displays the rows of the input table in reversed order.

Syntax

Table.ReverseRows(table as table) as table

About

This function produces a table that displays the rows of the input table in reversed order.

Explanation

In order to reverse the order of rows in a table, utilize Power Query M function MTable.ReverseRows. For example, consider a table with columns CustomerID, Name, and Phone containing records for four customers. By applying the MTable.ReverseRows function to this table, the output will display the same records but in reverse order based on CustomerID. The resulting table will show the records in descending order of CustomerID, with CustomerID 4 at the top and CustomerID 1 at the bottom.