Introduction :

We can perform many tasks through a power query. One of the most popular tasks that we can perform in a power query is ‘removing unnecessary rows’. Here in this article, I going to show you how to remove unwanted rows.

Step 1 – Remove from Top

In the first step I am showing you how to remove rows from the top. Open power query window by click on ‘Transform Data’ at the home page. The power query editor will be open. Go to ‘New source’ and select any of data resources. I am selecting Excel file for the first step. Import the file into power query editor. I have 13 rows in my table.

To remove rows from the top go to the ‘Home’ tab, click on the ‘Remove Rows’ drop-down menu.again and you will get 6 options.

Click on ‘Remove Top Row’ and enter the number of rows that you want to remove from the top and click on ‘Ok’. I want to remove the first two rows.

So, I have entered 2. I have also highlighted the first two rows.

After click on ‘Ok,’ the top two rows have removed now I have only 11 rows in my table. See below.

Step 2 – Remove from Bottom

In the second step I am going to remove rows from the bottom. To do so, click on ‘Remove Bottom Rows’.

Enter the number of rows that you want to remove from the bottom. I have entered 2.

Click on ‘Ok’, and your last two lines will be removed.

Step 3 – AlternateRows

The third option we have ‘Remove Alternate Row’. This is required when you want to remove the row from the middle. Once you click on this you will get three fields to be filled.

First row to remove
Enter the row number(index or position) that you want to remove or you want to skip from.

Number of rows to remove
Enter the number of rows you want to remove each time.

Number of rows to keep
Enter the number of rows you want to keep.

Here I entered 1, 2, and 3 respectively. I have a total of 9 rows, see the first column, Empname is starting from babu and ends with vijay. So If I click on ‘Ok’ the 1st and 2th row i.e. babu and kishore will be removed (because I entered 2 rows to be removed from the 1rd position) and only 3 more records should be kept and next two records will also be removed.

Click on ‘Ok’ and see the result.

Here you can see the marked rows were removed.

Summary

I hope you understand and enjoyed this article.

For any Help or Queries Contact us on info@crmonce.com or +918096556344.