Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
Hi Power BI Community,
I am new to Power BI and would like to sort Matrix Coloumn as we do in excel Pivots. I have tried, but i cannot figure out how to fix it.
I want the multiple sorting as follows:
1) Chronological order Date - Ascending order
2) Beneficiary by Sum of Amount in each date - Descending order [The Beneficiary can come on any date and multiple times in a month]
3) Purpose by Amount in each beneficiary - Descending order
The result should be as follows:
I know this is an old post but I believe the accepted "solution" is incorrect (in the sense that you can achieve the desired outcome but not via a specific setting).
I have verified that this can be accomplished partially in a similar way to Pivot Tables in Excel*. In short, you must add the Row field(s) you want to sort by in order (typically from "inner" i.e. most detailed value to "outer" i.e. least detailed category). You have to sort the "Rows" column in the visualization after each row field entry. In the OP Example: 1) You would first add ONLY the Row Field = "Purpose" and then sort the "Rows" column in the desired order. 2) You would then add the "Beneficiary" row field and again sort the "Rows" column in the desired order (the "Purpose" field will remain sorted in the originally selected sort order. 3) You would then add the "Date" row field and again sort the "Rows" column in the desired order (the "Purpose" and "Beneficiary" fields will remain sorted in the originally selected sort order(s). and so on.
I have tested this on PBI Desktop "Version: 2.121.644.0 64-bit (September, 2023)".
*In Excel, you can programatically set the sort order of the Pivot table matrix row columns via VBA - through which you have full control of the visual.
Hi @ShoaibAhmed ,
Please refer to these as alternatives:
https://community.powerbi.com/t5/Desktop/Sorting-by-multiple-columns/td-p/535690
https://community.powerbi.com/t5/Desktop/Matrix-multiple-Sort-columns/td-p/523938
There is no the same visual in pbi desktop for the time being
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks @amitchandak.
but is there any other visual which can give the above result.
@ShoaibAhmed , Multiple sorting is not supported on matrix. You can sort on row item or values item and rest of the sorting will adjust automatically
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
65 | |
63 | |
52 | |
37 | |
36 |
User | Count |
---|---|
82 | |
66 | |
61 | |
46 | |
45 |