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?
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
- ryan_mayuSuper User
what's the expected output?
is this what you want?
Column = RANKX('Table','Table'[金额],,DESC)- MostVIP2023Helper I
- ryan_mayuSuper User
then you can create measure
Measure = sum('Table'[金额])Measure 2 = rankx(ALLSELECTED('Table'[产品]),[Measure],,DESC)
- MostVIP2023Helper I
- ryan_mayuSuper User
you are welcome
- AnonymousNot 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