It sounds like your ‘ending balance’ column is the ‘previous row value’ that’s a calculated field, correct?
If so, could you please share the syntax for that calculated field?
Additionally, this may be easier to assist further if you’re able to upload a copy of your analysis with annonymized data to Quick Sight Arena so that I can test out some various scenarios: