Forum Discussion
Matrix columns formatting
- 10 months ago
I see what you’re trying to do. Let me go through your points one by one.
- For sorting, the matrix in Power BI doesn’t let you sort the column headers by values. You can do this for rows but not for columns. The closest option is to either swap rows and columns so that you can sort by the measure, or reshape the data so it’s in a “left product / right product / count” format. That way you can sort it properly in a table or chart.
- For column widths, you can fix them. Just select the matrix, open the format pane, turn off auto-size for column headers, and then adjust the widths manually. Once that’s done, they’ll stay the same even if you use slicers.
- For rotating the column headers, the built-in matrix doesn’t support this. If you really need them vertical, you’ll have to use something like the Deneb custom visual or export it into Excel or Paginated Reports where rotated headers are possible.
Hope this clears it up.
If this post helps, please consider marking it as a solution so others can find it more easily.
Regards,
Hi Si_7777
Excel is cell-based, so formatting in tables is much more flexible than in Power BI.
In Power BI the Matrix has predefined behavior, just like any other visual, so it works differently.
1. You can’t sort a Matrix columns order by value columns .
You can define the column order in advance by adding a sort column in the data model, but this is static — slicers and filters won’t change it.
Column width can be forced with a few workarounds, for example here:
https://www.youtube.com/watch?v=4ZtuifazEHk
Rotating column header text is simply not possible.
If you work heavily with matrices, it’s worth checking Zebra BI or Inforiver visuals. They are paid, but give much more flexibility because they are built specifically for advanced matrix scenarios.
More information about these features by the links:
https://inforiver.com/reporting-matrix/
https://zebrabi.com/power-bi-custom-visuals/tables/
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly