Monday, March 14, 2022

Filter by row position power query

Note: This article has done its job, and will be retiring soon. To prevent "Page not found" woes, we're removing links we know about. If you've created links to this page, please remove them, and together we'll keep the web connected.

In Power Query, you can use Query Editor to filter by row position. Filtering rows by position is similar to filtering rows by value, except that rows are kept or discarded by their position in the table rather than by cell values. You can create an Index column to show the row positions prior to removing any rows.

  1. Click the table icon (Table icon).

  2. From the table context menu select, Keep Top Rows.

  3. In the Keep Top Rows dialog box, enter the Number of rows to keep.

  4. Click Apply.

The Power Query Query Editor

  1. Click the table icon (Table icon).

  2. From the table context menu select, Keep Top 100 Rows.

  1. Click the table icon (Table icon).

  2. From the table context menu select, Keep Range of Rows.

  3. In the Keep Range of Rows dialog box:

    1. Enter the position of the First row to keep.

    2. Enter the Number or rows to keep.

  4. Click Apply.

  1. Click the table icon (Table icon).

  2. From the table context menu select, Remove Top Rows.

  3. In the Remove Top Rows dialog box, enter the Number of rows to remove.

  4. Click Apply.

Remove alternative rows

  1. Click the table icon (Table icon).

  2. From the table context menu select, Remove Alternative Rows.

  3. In the Remove Alternative Rows dialog box:

    1. Enter the First row to remove.

    2. Enter the Number of rows to remove.

    3. Enter the Number of rows to keep.

  4. Click Apply.

No comments:

Post a Comment