Power QueryExercises

Index column

A column of running numbers, added in the current row order.

An index reflects the row order at the moment it's added, so sort first. It's useful for keeping an original order, for comparing a row with the previous one, and for building integer keys. It is not a permanent ID: new rows renumber it.

In the Power Query editor

Add Column → Index Column, starting from 0, 1 or a custom value.

Common mistake

Adding the index before the sort or filter that should decide the order, then treating it as a stable ID. Any change to the steps above, or new rows in the source, renumbers every row, so a lookup or comparison keyed on the index silently matches the wrong rows after a refresh. Sort first, then add the index, and use a real business key such as an order number whenever you need to join two tables.

Learn more

Related functions

Practise it