I want to visualize the development of a Running total calculated as the difference between an input number and an output number (to show the stock). As dimension I use a combination of the calendar week and the year. Since this means that I have a lot of values I would like to show the latest ones only and therefore pin the scrollbar of the line chart to the right.
However, this ends up in a wrong calculation of the Running total, since it starts calculating with the values on the right side. That ends up in wrong (negative) values of the stock.
Is there any possibility to overcome this issue and somehow pin the scrollbar to the right and still let the Running total calculate correctly? An alternative solution would be to limit the values shown to the latest 20 or so. However, this also ends up in wrong results since the Running total only takes the shown values into account then.
Thanks for your help!