How Can You Add an Index Column to a Table in Power BI?

To add an index column to a table in Power BI, you can use the “Add Column” feature and choose “Index Column” from the drop-down menu. This will automatically generate a sequential index number for each row in the table, starting from 0. This index column can be useful for sorting, filtering, and referencing specific rows in the table. It can also be customized to include a prefix or suffix, or to start from a different number.


You can use the Index Column feature from the Power Query Editor in Power BI to quickly add an index column to a table.

The following example shows how to do so in practice.

Example: How to Create Table from Another Table Using DAX

Suppose we have the following table in Power BI named my_data:

Suppose that we would like to add an index column that ranges from 1 to n.

To do so, click the Home tab along the top ribbon, then click the Transform data icon:

This will bring up the Power Query Editor.

Next, click the Add Column tab, then click the dropdown arrow next to Index Column and choose whether or not you’d like the index values to start at 0 or 1:

Power BI add index column

We’ll click From 1 so that the following index column is added:

Once you exit out of the Power Query Editor, a message box will appear that asks if you’d like to apply your changes.

Once you click Yes, the index column will be added to the table:

Notice that the values in the new index column range from 1 to 11.

Additional Resources

The following tutorials explain how to perform other common tasks in Power BI:

x