You can go with
RANK_UNIQUE( (100 * SUM( [Rating] )) + SUM( Value2 ))
Depending on how big Value2 can get you can change the multiplier of 100 for something bigger (in case SUM(Value2) would be higher than 100*SUM(Rating).
See in the attached...
sortRank ed mc.twbx 37.2 KB
Thanks - that should do the trick!
With a total of value2 as the multiplier of the rating I should be safe using the formula.