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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
wulawula
Frequent Visitor

Custom Sort in Matrix

Hello, I have encounter a problem on how to custom sort columns just as what I can do in Excel files.

 

I have 3 columns to show on the Matrix. I want to show column A in ascending order and column C in descending order grouped by column A as the table showed below.

Column AColumn BColumn C
AgencyF100000
 C90000
 E80000
 D70000
 B60000
 A50000
Self-PayC75000
 D65000
 B60000
 A50000
Worker's CompA85000
 B35000

 

 

I know many people may asked about the similar questions about custom sort in Matrix. I tried to use ISONORAFTER function to get the order but it's not working for me. Is there any other helpful functions can be used in the case? Thank you so much!

4 REPLIES 4
SpartaBI
Community Champion
Community Champion

Why don't switch to Table visual instead of a Matrix and than you could do any combination of sorting you want by:
1. Sort Coulmn A asceding 
Hold shift key and:
2. Sort Column C descending

Thanks @SpartaBI . Yes, that's what I thought too. But what can we do if the end user prefers the Matrix layout? Matrix is nice and neat without showing repeat items.

Than you should change the end user 😂

You can maybe create a sortby column for Column B that will be the negative number of the Column C value and than sort Column B by it, and the Matrix will be sorted the way you want, but this will work only if we are talking about a static situation where the values of colunn won't change their sorting based on different filter context. WDYT? 

Thank you! That works if it's a static list and I'm trying to think it through since the data is dynamically changed.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.