Forum Discussion
AmudhaKumaran
4 years agoHelper I
RANKX
Hi Team, Looking for hep on RANKX function. Any immediate help is appreciated. I have a fact table with multiple rows for a single ID based on many dimensions. Total score is identified for eac...
- Anonymous4 years ago
Hi,
Please refer the following formula.
rank1 = var _tab=SUMMARIZE('Table','Table'[total scare]) Return RANKX(_tab,[total scare],,DESC,Dense)final = var _count1=CALCULATE(DISTINCTCOUNT('Table'[name id]),FILTER('Table','Table'[rank1]<EARLIER('Table'[rank1]))) var _count2=CALCULATE(DISTINCTCOUNT('Table'[rank1]),FILTER('Table','Table'[rank1]<EARLIER('Table'[rank1]))) Return 'Table'[rank1]+_count1-_count2If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards
Community Support Team _ Polly
amitchandak
4 years agoSuper User
AmudhaKumaran , Try a measure like
rankx(allselected(Table), calculate(Sum(Table[Score]), allexcept(Table, Table[name])))
AmudhaKumaran
4 years agoHelper I
Hi amitchandak ,
Thanks for your response. Tried the measure, still I'm getting same result.
DAX:
RANKX(ALLSELECTED('Rank Test Table'), CALCULATE(SUM('Rank Test Table'[Total Score]), ALLEXCEPT('Rank Test Table', 'Rank Test Table'[name])))