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
Anonymous
Not applicable

Sort table/matrix by both row total and column total

Hi guys,

 

Is it possible to sort a table or matrix by both row total and column total?

 

YongChen_0-1649376969035.png

As you can see, the above matrix only sort the matrix by row total and not column total. I've seen some solution which including adding a rank column, I don't think that it will work when I add a slicer to filter the table/matrix. I've also found a post stating that it is not a function in Power BI, so I am just making sure if it can be done or not.

 

If you have any solution to make this work please let me know.

Thanks in advance.

2 REPLIES 2
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

To my knowledge, no perfect way to sort the column total in Matrix visual. 

You can create custom sorting for the column fields in the matrix, such as creating a column, calculating the sum of each fruit, and then sorting the fruit. However, after some slicers are applied, the total changes at any time, and the sorting does not change dynamically.


Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , Row you can only sort on Total values on measures or Row (pivot0 column.

 

For column (Pivot) you need to use order  by column

How to Create Sort Column and Solve Related Errors:
https://www.youtube.com/watch?v=KK1zu4MBb-c

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.