This works just fine when I sort my table on anything I like. I would like an expression that forces the calculation to be based on another specific column (lets say it is a column called "sales").
I have come across the AGGR function which allows you to do this but I can't work out how to use it do what I want. Should it be immediately before the rangesum function or the above function. Do I even need the above function?