Forum Discussion

PaulinRoc's avatar
PaulinRoc
Frequent Visitor
3 years ago
Solved

Rank by a column excluding another column

Hello to all, I would like to create a ranking column that ranks wines according to the average score obtained. Here is my dataset :   Here is my objective:     The problem is th...
  • onurbmiguel_'s avatar
    3 years ago

    Hello 

     

    Try this measure: 

    Rank = 
    var _rank =
    RANKX(
        ALLSELECTED('Wine Score'),
        CALCULATE(
            sum('Wine Score'[Score]),
            ALLEXCEPT('Wine Score','Wine Score'[Wine])
        ),
        ,
        DESC,
        Dense
        )
    return 
    _rank

     

     

    Best regards

    Bruno Costa | Solution Supplier

     

    Did I help you to answer your question? Accepted my post as a solution! Appreciate your Kudos!! 👍

    Take a look at the blog: PBI Portugal