Forum Discussion
quynhttk
1 year agoFrequent Visitor
How to Sort Data in Power BI Matrix by Multiple Conditions
I have raw data as follows Then I use power bi and use Matrix to drag the table as follows. However, I want to sort by the following 2 conditions: 1. Sort by year from smallest to largest 2....
- 1 year ago
Matrix can only be sorted either by value or by category. In your case, you can sort by the field in the second level of the row hierarchy.
JustSayJoe
1 year agoAdvocate IV
Step 1: In your Matrix, add a field to the row hierarchy (which you will later remove).
Step 2: Change the Matrix to a Table visual.
Step 3: Sort all the columns you wish to sort, and in the order you wish them to be sorted.
Step 4: Delete the field you previously added in Step 1 from the table.
Step 5: Change the Table back to a Matrix visual.
Step 6: Ensure the right fields are back in the Row hierarchy.
This will maintain your multiple sorted fields within your matrix, even when you expand your row hierarchies.