Forum Discussion

Vish24's avatar
Vish24
Icon for Helper II rankHelper II
6 years ago
Solved

Ranking based on measure

Hello,   I am trying to do the ranking for sales by people in regions. I am getting correct result if I am showing in table. But I want to make a slicer for a sales persons names and then show the ...
  • v-eachen-msft's avatar
    6 years ago

    Hi Vish24 ,

     

    At first, you need to add an index coloumn in the query editor.

    Then refer to the following measure:

    Measure =
    MINX (
        FILTER (
            SELECTCOLUMNS (
                ALLSELECTED ( 'Table' ),
                "index", 'Table'[Index],
                "rank", RANKX ( ALLSELECTED ( 'Table' ), 'Table'[Column2],, DESC, DENSE )
            ),
            [index] = MAX ( 'Table'[Index] )
        ),
        [rank]
    )

    Here is my test file for your reference.