Forum Discussion

renecornish's avatar
renecornish
Regular Visitor
2 years ago
Solved

Ranking Across Columns

I have distance travelled data between various locations ~ stipulated in individual columns.  I am now wanting to rank which location is first, second, third closest (or less in distance).  How do I ...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Thank you for your prompt reply Greg_Deckler 

    Hi renecornish
     

     

    Based on your needs, I have created the following table.

     

    Then in power query, hold down the Ctrl key to select all columns, click "unpivot column".


    Click"close and apply", Then you can use the following Dax to get the rank of the column:

    Column = RANKX('Table','Table'[Value],,DESC)

     

    Result:



    Best Regards,

    Jayleny

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.