Using the Rank Formula to Sort Accounts
Your Rank code might look something like this:
rank(sum(if("Deals"."Stage" LIKE 'Closed Won',"Deals"."Deal Size",0)),'desc')
Though remember, you can choose to rank off any number of variables—it doesn’t have to be exactly what I chose.