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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
gadao
Frequent Visitor

Index Numbers Sort Dif from Source Table

Hello there, 

 

Got into something really strange and no idea how to solve it.

 

I have a aux table which contains information from the IDs of the main table. The data is divided in ID, Date, Status and Comment.

I sorted this table by Date, oldest to newest, then I grouped by ID and All Row as output, i edited the code in order to add a index number.

 

After that I merged all the columns, except the ID column.

 

At this point, i have two columns, the ID and the "information column"

 

I grouped again by ID and edited the code to merge the rows with a line break.

 

So far so good, i got what i need it.

 

I got a ID col and a "comeplete info" column. The data in the "Complete Info" column is in the order i wanted to.

 

Now i merged this aux table with the main table, the problem is that the data in the "Complete Info" is in a order different from the source, the aux table.

 

The thing is that all I did was a merge.

 

Aux Table - that's correct

Aux tableAux table

 

Main Table - It's different 

Main TableMain Table

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@gadao Try using Table.Buffer as you often need this in order to preserve a custom sorting in Power Query.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

@gadao Try using Table.Buffer as you often need this in order to preserve a custom sorting in Power Query.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
gadao
Frequent Visitor

Found the solution.

 

I need to buffer the table in order to the sort keeps its effects from that point beyond.

 

I used the Table.Buffer with the Table.Sort inside.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors