Forum Discussion

acitsme's avatar
acitsme
Icon for Advocate II rankAdvocate II
4 years ago

rankx extremely slow

I have a simple measure like below to rank all entries in a table 

 

Rank =
RANKX(
    ALLSELECTED(Flat[STIR]),
    [Sum of STIR]
)
 
Table contains about 900k rows and such measure is really slow. (Be informed that I need to rank all entries because it will be part of a quintile-quintile plot).
 
Any idea to improve it (STIR is a decimal number)?

1 Reply

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    acitsme Ranking a million things is going to be slow. Are all million rows unique in that you will end up with 1 - 1,000,000 numbers in terms of rankings? If so, then perhaps just do a sort in Power Query and then add an index.