Forum Discussion

AlwaysLearn's avatar
AlwaysLearn
Frequent Visitor
2 years ago
Solved

How to sort multiple columns separately

Hi,   I would like to explore following scenario: I have monthly progress variance for 100 projects. For filtered year (e.g. selected year 2023) from Jan to Dec, sort descending by larger delay va...
  • shafiz_p's avatar
    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!!

  • Anonymous's avatar
    Anonymous
    2 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.