Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Chris_23
Helper II
Helper II

Add Index Column doesn't maintain order of previous step

Hello guys,

I have a problem with maintaining the order of each row by adding a index column.

 

The following table:

 

Chris_23_0-1637745844544.png

 

First the column 'Filter' is sorted in ascending order.
Based on this step, an index column should now be added. However, adding it discards the order of the previous step. 

Chris_23_1-1637746033341.png

 

 

I have tried unsuccessfully to work with Table.Buffer.

Chris_23_2-1637746107376.png

 

 

Any ideas how adding an index column preserves the order of the previous step?

 

Kind regards

Chris

1 ACCEPTED SOLUTION
Chris_23
Helper II
Helper II

i have find the problem. Some steps before i already had sorted by column Filter. However that leeded to the mentioned problem. After delete this step all works fine. thanks

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

" After delete this step all works fine. "   ??  What step?

Chris_23
Helper II
Helper II

i have find the problem. Some steps before i already had sorted by column Filter. However that leeded to the mentioned problem. After delete this step all works fine. thanks

Anonymous
Not applicable

I'm having the same problem with Table.Range(). For some reason, the function don't get the right row informed. And when I used Table.AddIndexColumn(), the order of the table rows changes completely. I have no clue why Power Query doesn't maintain the order from one step to another. It doesn't make any sense at all!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.