You can try enclosing your expression in an advanced aggregation aggr() function, with the aggr() dimensions being your chart dimensions.
This might work but it is essential that your aggr() dimensions (at least the dimensions relevant to your rangesum) have a load order that matches your sort order needed (e.g. chronological))
If you can upload a small sample, I could check if this idea might work for you.
I remember I have also posted some samples here in the forum that demonstrate the approach, but couldn't found one of them at the moment.