maybe you can try this
=rankx(ALLSELECTED(LedgerEntry[CustomerNo]),[Revenue,,DESC)
if this does not work, pls provide some sample data