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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
nicktayl
Helper I
Helper I

Easy Way to Custom Sort Pivot Tables

Hi,

 

I've come across a number of examples of how to do custom sorts and a bit more complex than I was hoping. There must be a simpler way to custom sort a pivot such as this than to have to create a custom index table, create a relationship to the main table field that you wish to index, and then change the field so that it is sorted on the new index table. With pivot tables and Tableau one can drag the fields to the desired position.

 

It would be nice if I could right click on a field and then define the sort order manually there. 

 

Thanks,

Capture.PNGNick

1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @nicktayl,

 

Perhaps you can try to refer to below steps if it suitable for your requirement:

 

Sample table: number(index, value, percent), text(category)

1.PNG

 

Steps:

1. Add a calculate column to get min value of each catagory.

MinValue = MINX(FILTER(ALL(SampleData),[Catagory]=EARLIER(SampleData[Catagory])),[Percent])

 

2. Add rank based on minvalue column.

Rank = RANKX(VALUES(SampleData[MinValue]),[MinValue],,ASC) 

2.PNG

 


3. Create a matrix visual with above columns.(sort by rank)

3.PNG

 

 

Regards,

Xiaoxin Sheng

View solution in original post

3 REPLIES 3
prateekraina
Memorable Member
Memorable Member

Hi @nicktayl,

 

This sorting technique by drag and drop is not yet possible in Power BI.

Thanks !!!

@prateekraina Is there an easy workaround?

Anonymous
Not applicable

HI @nicktayl,

 

Perhaps you can try to refer to below steps if it suitable for your requirement:

 

Sample table: number(index, value, percent), text(category)

1.PNG

 

Steps:

1. Add a calculate column to get min value of each catagory.

MinValue = MINX(FILTER(ALL(SampleData),[Catagory]=EARLIER(SampleData[Catagory])),[Percent])

 

2. Add rank based on minvalue column.

Rank = RANKX(VALUES(SampleData[MinValue]),[MinValue],,ASC) 

2.PNG

 


3. Create a matrix visual with above columns.(sort by rank)

3.PNG

 

 

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.