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
| Parameter | Type | Description |
|---|---|---|
table | table | The 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}}))
| Date | Sales |
|---|---|
| 2026-01-03 | 9 |
| 2026-01-02 | 12 |
| 2026-01-01 | 10 |