Power Query Problems

Fix Power Query Index Column Not Numbering Every Row

Steven ParkerSteven Parker Nov 10, 2026 869 views

Question details

The Power Query index column is missing numbers, skipping rows, or failing to provide a consecutive sequence for the final dataset.

How to Fix Power Query Index Column Not Numbering Every Row
Product
Excel Power Query
Device & OS
not provided
Scenario
Adding an index column to a dataset in Power Query to assign consecutive row numbers.
Observed behavior
The resulting index column has gaps, blank values, or skips numbers instead of numbering every visible row consecutively.
Before you start

Open the Power Query Editor in Excel and ensure the 'Query Settings' pane on the right side is visible so you can review your list of Applied Steps.

Solution 1Recommended

Move the Index Column Step to the End of the Query

Rearranging the applied steps ensures the index is calculated after all filters and transformations, producing consecutive numbers for the final dataset.

Power Query executes operations sequentially. If you add an index column and subsequently apply a filter or a merge, the filtered rows are removed along with their assigned index numbers. This leaves noticeable gaps in your final numbering.

To guarantee that every row in your final output is numbered consecutively, the index creation must be the very last step in your query.

1
Review Applied Steps

In the Power Query Editor, look at the 'Applied Steps' section within the Query Settings pane on the right.

2
Delete the Existing Index Step

Locate the 'Added Index' step. Click the 'X' icon to the left of the step name to delete it, or right-click it and select 'Delete'.

3
Apply Filters and Transformations

Perform any necessary filtering, merging, or appending steps first so your dataset displays the exact final rows you want to keep.

4
Add a New Index Column

Go to the 'Add Column' tab on the top ribbon, click 'Index Column', and choose either 'From 0' or 'From 1' to apply consecutive numbering to your finalized dataset.

Move the Index Column Step to the End of the Query
Preserving Original Row Numbers: If your goal is to keep track of the original row numbers before any data was removed, you should leave the Index Column step exactly where it is (before the filtering steps) and accept the gaps in the final numbering.
Free Microsoft Office alternative

Manage Data Efficiently with WPS Office

If you are looking for a fast, lightweight, and cost-effective way to manage spreadsheets and analyze data without complex query troubleshooting, WPS Office is an excellent choice. It offers a familiar interface, powerful built-in data tools, and seamless compatibility with Microsoft Excel files.

  1. 1. Install WPS Office: Download and install WPS Office for free on your PC or mobile device.
  2. 2. Open Your Spreadsheets: Open your existing Excel workbooks directly in WPS Spreadsheet without losing formatting.
  3. 3. Analyze Data Easily: Navigate to the Data tab to instantly sort, filter, and organize your records.
Highly compatible with Microsoft Excel formats (.xlsx, .xls, .csv)Lightweight application that runs smoothly on older devicesFamiliar spreadsheet interface requiring no steep learning curveBuilt-in data sorting, filtering, and pivot tables for quick data analysis
microsoft office alternative - wps office

Frequently Asked Questions

Why does my Power Query Index skip numbers after I filter the data?

The index column numbers rows based on the dataset's exact state at the moment the index step is applied. If you filter out rows in a subsequent step, the index numbers attached to those removed rows disappear, creating gaps in your final table.

Can I start the Power Query Index from a specific number instead of 0 or 1?

Yes. In the Power Query Editor, go to the 'Add Column' tab, click the drop-down arrow next to 'Index Column', and select 'Custom'. You can then specify the starting number and the increment value for each row.

How do I fix missing index numbers caused by a merge operation?

If merging tables expands your row count or introduces blank rows, delete your current Index step and re-add it from the 'Add Column' tab after the merge and expansion steps are completely finished.