How can I add an index column to a table in Power BI?

In order to add an index column to a table in Power BI, you can use the “Index Column” feature located in the “Add Column” tab. This will automatically generate a sequential number for each row in the table, providing a unique identifier for each record. This can be useful for sorting and filtering data, as well as creating relationships between tables. By following this process, you can easily add an index column to your table in Power BI.

Power BI: Add Index Column to Table


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