Forum Discussion

tps136's avatar
tps136
Advocate II
7 years ago
Solved

Matrix multiple Sort columns

Hi All,   I've gone thru all other request in Desktop - Matrix Multiple column sort. But nothing  worked. Need experts help :smileyhappy: I am trying to sort 2 columns (1st level - Employee by ASC...
  • v-chuncz-msft's avatar
    7 years ago

    tps136,

     

    You may try using ISONORAFTER Function to add a measure.

    Measure =
    VAR e =
        SELECTEDVALUE ( Table1[Employee] )
    VAR c = [TotalCount]
    VAR t =
        SUMMARIZE ( ALLSELECTED ( Table1 ), Table1[Employee], Table1[Customer] )
    RETURN
        COUNTROWS (
            FILTER ( t, ISONORAFTER ( Table1[Employee], e, DESC, [TotalCount], c, ASC ) )
        )