Forum Discussion
How to sort multiple columns separately
- 2 years ago
Hi, AlwaysLearn You can sort multiple columns in table using "Shift + Left clicking" the column header. Left click again for opposite direction. You can then convert the table to matrix if you want.
If this solved your problem, please mark it as a solution!!
- Anonymous2 years ago
Hi AlwaysLearn
Please try this:
Here I create a set of sample:
Then add a calculated column:
Column = ROWNUMBER(ORDERBY( 'Table'[Month], ASC, 'Table'[Values], DESC ))Then you can sort the matrix or table visual by this column, the result is as follow:
ROWNUMBER function (DAX) - DAX | Microsoft Learn
ORDERBY function (DAX) - DAX | Microsoft Learn
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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.