Forum Discussion

MostVIP2023's avatar
MostVIP2023
Helper I
1 year ago
Solved

Issue with Rankx in calculated column

Dear experts,

 

  When I use rankx in calculated column ,it returns 1 in all rows, would you pls advise me how to fix it?

 

 

  • ryan_mayu's avatar
    ryan_mayu
    1 year ago

    MostVIP2023 

    then you can try this

     

    Column =
    var _sum=CALCULATE(sum('Table (2)'[金额]),ALLEXCEPT('Table (2)','Table (2)'[产品]))
    var _tbl=SUMMARIZE('Table (2)','Table (2)'[产品],"total",sum('Table (2)'[金额]))
    return COUNTROWS(FILTER(_tbl,[total]>=_sum))
     

8 Replies

  • what's the expected output?

     

    is this what you want?

     

    Column = RANKX('Table','Table'[金额],,DESC)
     
  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi MostVIP2023 ,

    Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.

    If these also don't help, please share more detailed information and description to help us clarify your scenario to test.

    How to Get Your Question Answered Quickly 

    Regards,

    Xiaoxin Sheng