Forum Discussion
Matrix sorting does not work when I add an attribute to a column?
I have a matrix where I'm trying to sort by the value. In the first screenshot the matrix has a field in the Rows and a measure in the Values, and the sorting obviously works.
However, once I add a field to the Columns, and then attempt to use the sort by feature when clicking the 3 dots, the sort becomes all out of sync. Any ideas here? I checked all the corresponding data types and all the fields/values involved come from just one singular dataset. Is this a common problem with PBI matrix visuals?
*Before I click the sort by feature, I did select the column of 2025, just lazy to go back and edit the screenshot*
2025 column values are not sorted correctly
Totally agree. A calculate measure filtering by year would totally work for what you are wanting to do.
4 Replies
- d_m_LNK
Super User
I have run into this before too. I think what it's actually doing is sorting by the total Sum of the row it's filtered by and not by the years. For instance it looks like it's not sorting right for the 2025 year but when you total add the two columns for 2024 and 2025 together it is sorting descending. If you show the column subtotals on the matrix you will see that those totals are sorting descending.
That's more of a "why it's doing that" answer. If I find a workaround I will report back.
- justadashboardRegular Visitor
Appreciate your response. I'll also report back if I find a solution. In the meantime I think what I'm going to do is create custom measures for the appropriate timeframes that will get displayed in the matrix. That way I won't need to drag anything over to the Columns of the matrix. If everything is a measure then i can click within each column and sort appropriately.
- d_m_LNK
Super User
Totally agree. A calculate measure filtering by year would totally work for what you are wanting to do.