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!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi Everyone,
I am facing an issue with the sorting of columns in Power BI Matrix visual.
Problem Statement : Below is the test data set that we are using.
We want to sort country column i.e. (USA,India, Australia,England) based on the Row C figures falling in the column Total and is also highlighted in Red.
Total( Measure) = Direct + Indirect
Please provide your suggestions to attain this functionality or any workarounds to achieve same.
Thanks,
Ashish
Hi @Anonymous ,
Unfortunately, power Bi cannot sort in matrix.
As far as i konw,we can't set conditional formatting in row field, we can only set conditional formatting in value field.
You can create DAX like this and apply in conditional formatting.
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hey @Anonymous
Power BI does not have functionality for sorting by rows in a power bi matrix. Your options are
1. To try the sort by function in the visual or Modeling tab: https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column
2. Sort By in the query editor: https://community.powerbi.com/t5/Desktop/Sorting-columns-in-Query-Editor/td-p/339238
3. Pivot your visual to switch the columns and rows so you can simply click the column C header to sort by that column.
4. Use the RANK (or RANKX) DAX functions to ranks your countries and sort that way: https://community.powerbi.com/t5/Desktop/Dynamic-ranking-by-sorted-column/td-p/501152
https://powerbi.tips/2017/07/ranking-values-with-measures/
If this helps please kudo.
If this solves your problem please accept it as a solution.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 52 | |
| 51 | |
| 35 | |
| 15 | |
| 14 |
| User | Count |
|---|---|
| 92 | |
| 75 | |
| 41 | |
| 26 | |
| 25 |