OpenBI Docs Buy

Table.ReverseRows

Turns a table upside down: the last row first, the first row last.

Group: Table. Power Query M has it too: a query that uses it is written as in Power BI.

Syntax

Table.ReverseRows(table as table) as table
ParameterTypeDescription
tabletableThe table to turn.

Returns

table. The same rows and columns, bottom to top.

Examples

Newest day first

Table.ReverseRows(#table({"Date", "Sales"}, {{#date(2026, 1, 1), 10}, {#date(2026, 1, 2), 12}, {#date(2026, 1, 3), 9}}))
DateSales
2026-01-039
2026-01-0212
2026-01-0110

Table.Sort, List.Reverse, Table.LastN.

Last updated · OpenBI Studio 0.3.79