Welcome to Qlikview. Can I suggest that when you post script or expressions that you post them as text rather than as images. This makes it easy to copy to examine and/or modify.
I dont think you need the Aggr() form of these expressions, just use Rank(Sum....)). But if you do use the Aggr(), then it must include all the dimensions from the chart in the Aggr dimension list.
I have just noticed that you are using the Rank in the dimension (and that's why you needed the rank) - try doing it as an expression instead.