Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
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
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!
Solved! Go to Solution.
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.
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.
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.