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

custom sorting matrix based on specific filters

Hi experts,

below is the matrix. there are 3 row headers: type, plant and product. i drilled them down. there are two column headers: category (here drilled down to specific categories: sales prices, performances variable cost, and ranking), and month (here drilled down to 7 months). Be aware that the months change in different data source.

I want to sort the rows descending based on the values of performances variable cost of the first month. and i have succeed to do so by creating a dax formula table

Yao2319_1-1690965151961.png

to have the distinct product column sorted by the distinct value column (the values are the values of the first month performances variable cost).

the problem is with the current order of stepped row headers (1st type, 2nd plant and 3rd product), i still can't sort the matrix descending by the products based on the first month performances variable values. i can only succeed to do this by putting product as the 1st row headers level. 

May i ask why it happens this way and are there any other ways to sort the matrix based on the performance variable cost of the first month while at the same time keep the row header orders as type>plant>product?? be aware that the months change in different data sources.

thanks in advance!

 

Yao2319_0-1690964667350.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

well, by talking to chatgpt a lot of times about (as gpt cannot understand it quite well...), i can achieve this by make dax coding. but the ranking numbers are in text type. i think this may have some influences on the further calculations maybe, since it is not Number type.  

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

well, by talking to chatgpt a lot of times about (as gpt cannot understand it quite well...), i can achieve this by make dax coding. but the ranking numbers are in text type. i think this may have some influences on the further calculations maybe, since it is not Number type.  

Anonymous
Not applicable

Hi @Anonymous ,

It seems like you want to be able to customize the sorting in the matrix? Power BI naturally sorts alphabetically. You can vote here: Custom Sort/Order Table or Matrix .

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

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

 

 

 

Helpful resources

Announcements
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