Forum Discussion
Column SORTING in Matrix Visual
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
2 Replies
- AnonymousNot applicable
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.
- V-lianl-msftCommunity Support
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.
Measure = IF(MAX(table[product])=C,"#ff0000")Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.