You need to do something like this
Window_sum(if Rank<=3 then Sum(Sales) End)
1.Note that Window_Sum() and Rank are both table calcs, you have a nested table calculations.
You need to set both up if the default doesn't work.
2.You can replace 3 by a parameter if necessary.
i am not 100% sure why ahha but this works
ill study it a bit, you rock!