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

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

Reply
gingersnap
Helper I
Helper I

custom sort for large amount of data

I have a column with over 40k entries. 100 of them are unique. I want to custom sort them. Should I try to use a custom sort table?

1 ACCEPTED SOLUTION
Kedar_Pande
Super User
Super User

@gingersnap 
Create a Custom Sort Order Table:

Unique Value Sort Order
Value A 1
Value B 2
Value C 3
Value D 4
Value E 5
... ...


Create a Relationship from your main table (the one with over 40k entries) to the CustomSortOrder table.

Select the column you want to sort (the one with over 40k entries).
In the Column tools tab, find the Sort by Column dropdown.
Select the Sort Order column from the CustomSortOrder table.

 

💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn

View solution in original post

3 REPLIES 3
Kedar_Pande
Super User
Super User

@gingersnap 
Create a Custom Sort Order Table:

Unique Value Sort Order
Value A 1
Value B 2
Value C 3
Value D 4
Value E 5
... ...


Create a Relationship from your main table (the one with over 40k entries) to the CustomSortOrder table.

Select the column you want to sort (the one with over 40k entries).
In the Column tools tab, find the Sort by Column dropdown.
Select the Sort Order column from the CustomSortOrder table.

 

💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn

Thank you! Can I duplicate the table with the 40k entries to create the new sort table and then remove the other columns I dont need?

PijushRoy
Super User
Super User

Hi @gingersnap 
If you want to sort in Power Query, yes you can sort. 
More details https://www.youtube.com/watch?v=uZLmWz60_do

https://www.youtube.com/watch?v=7PVjvY4a_V8

https://community.fabric.microsoft.com/t5/Desktop/Power-Query-Custom-Sort/m-p/523096

 




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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 Solution Authors
Top Kudoed Authors