Add an index column (Power Query)

Create an index column to show the number of a row in a query. This is especially useful when you are filtering by row position or by a range or rows. The index column can help you confirm your results. An index column is also added to an Excel worksheet when you load it.   

Your browser does not support video.

Procedure

  1. To open a query, locate one previously loaded from the Power Query Editor, select a cell in the data, and then select Query > Edit. For more information see Create, load, or edit a query in Excel (Power Query).

  2. Select Add Column > Index Column. The default behavior is to start numbering the first row at 1. Alternatively:

    • If you select the arrow and select From 0, you can start numbering the rows at 0.

    • If you select the arrow and select Custom, you can enter a Starting Index and Increment to specify a different starting number and way to number each row. For example, if you enter the numbers 2 and 2, the rows are numbered as 2, 4, 6, and so on.

Result

A column named Index is added to the end of the query. You can drag and drop the new column to a different location if you want. You can also rename the column. For more information, see Rename a column.

See Also

Power Query for Excel Help

Add an index column (docs.com)

Need more help?

Expand your Office skills
Explore training
Got It
Get instant Excel help
Connect to an expert now
Subject to Got It terms and conditions

Was this information helpful?

×