Reversing Rows with Power Query Feature In Excel


Reversing Rows with Power Query Feature In Excel

Power Query allows the execution of several steps in series for the basic purpose of transformation of data present in Excel. One can reverse the order in which the rows are arranged quite easily by executing one of the steps.

Reversing the rows in the absence of power query in excel isn’t quite straight forward. A helper column must be added manually which contains the order which is listed out (say from 1 to 10)  as Excel is not equipped with a function of Reverse row. Sort function must be used and option named “Sort Largest to Smallest” must be selected. Now the data has been switched to reverse order.

The following steps can be followed to execute it in Power Query.

Step 1: An excel table must be created by selecting the data by either pressing Ctrl+T key or by following – Insert Table

Step 2: Follow the sequence in the following format: Dataà Get and transformà from table (for 2016 version of excel) or power queryà excel dataà from table (for 2010 as well as 2013 version of excel)

Step 3: The above step will open the Power Query Editor

You will see that the ranks are in the order from 1 to 10. The basic objective is to reverse the order.

Step 4: Inside this, follow the sequence: transform> Reverse Rows

Step 5: Changes which are taking place can be seen. The ranks are now arranged in the order 10 to 1.

Step 6: Click on the tab named “Home” and select the option which is named Close and Load. This will lead to a fresh worksheet being opened in the workbook of Excel along with data which is updated.

The new table which is now created is in the reverse order.