Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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. In each year, revenue by product is sorted from largest to smallest revenue.
I can only sort by 1 condition, I cannot combine both conditions.
This is the result I want
Please help me!
Solved! Go to Solution.
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.
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.
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.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
62 | |
61 | |
55 | |
38 | |
26 |
User | Count |
---|---|
85 | |
60 | |
45 | |
41 | |
39 |