Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Custom ranking (preassigned values)

  Hi Power BI Guru's, I am not a programmer & new to Pwer BI. I seek your help in a custom solution to ranking my data under "Matrix" visualization which I am building for Top 50/100 or 300 custom...
  • Zubair_Muhammad's avatar
    Zubair_Muhammad
    8 years ago

    Hi Anonymous

     

    If you are looking for a MEASURE, you can use this formula

     

    RANK_Measure =
    IF (
        SELECTEDVALUE ( TableName[Customer] ) = "Multiple Customers",
        301,
        RANKX (
            FILTER (
                ALL ( TableName ),
                TableName[Financial Year] = SELECTEDVALUE ( TableName[Financial Year] )
                    && TableName[Customer] <> "Multiple Customers"
            ),
            CALCULATE ( SELECTEDVALUE ( TableName[Values USD] ) )
        )
    )