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))