Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

URGENT!! Ranking measure not working.

Hello Power BI community!Preview   Can you help me with the below ranking code? This code is giving me the same ranking for different % of search order columns:    SortingOrderSearchOrder_Single...
  • tharunkumarRTK's avatar
    tharunkumarRTK
    2 years ago

    Anonymous 

    I was wondering why cannot you use this pattern 

    RANKX( ALLSELECTED('df_Search Order (First)'[Search Order (First)])  , [Category_Occasion_SingleSelect%]) 

      


    If the post helps please give a thumbs up


    If it solves your issue, please accept it as the solution to help the other members find it more quickly.


    Tharun

     

  • Ashish_Mathur's avatar
    Ashish_Mathur
    2 years ago

    Hi,

    I revised your measure to:

    Ranking SingleSelect = 
    RANKX(ALLSELECTED('df_Search Order (First)'[Search Order (First)]), [Category_Occasion_SingleSelect%], , DESC, Dense)
    

    This also works

    Ranking SingleSelect 1 = 
    RANK(DENSE,SUMMARIZE(ALLSELECTED('df_Search Order (First)'),'df_Search Order (First)'[Search Order (First)],"A",[Category_Occasion_SingleSelect%]),orderby([A],DESC))

    Hope this helps.