Forum Discussion
Sorting by columns in a Matrix
Hi,
Is it possible to be able to sort by each of the columns in a Matrix (example visual below), I can sort by Total (highlighted in yellow), but want to be able to sort by the other 3 columns as well.
many thanks,
Hi, I would like to be able to sort by each of the columns in the same way that you can sort by the total column. However I have now changed the visual from a Matrix to a table and that has given me something that works, so we can now consider this question solved.
Many thanks
4 Replies
- AnonymousNot applicable
Hi NLEIGH
Maybe you can try to use the ROWNUMBER() function to sort the columns:
Here I create a set of sample for your reference:
Then add a calculated column:
Column = ROWNUMBER ( ORDERBY ( 'Table'[Column2], ASC, 'Table'[Column1], ASC ) )The result is as follow:
Here for your reference:
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.- NLEIGHHelper I
Hi, Many thanks for taking the time to reply, however I dont believe this solves the issue.
- AnonymousNot applicable
Hi NLEIGH
So what is your target outcome?
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.