Forum Discussion
MostVIP2023
1 year agoHelper I
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?
- 1 year ago
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))
ryan_mayu
1 year agoSuper User
what's the expected output?
is this what you want?
Column = RANKX('Table','Table'[金额],,DESC)
- MostVIP20231 year agoHelper I
- ryan_mayu1 year agoSuper User
then you can create measure
Measure = sum('Table'[金额])Measure 2 = rankx(ALLSELECTED('Table'[产品]),[Measure],,DESC)- MostVIP20231 year agoHelper I
- MostVIP20231 year agoHelper I
- ryan_mayu1 year agoSuper User
you are welcome