My data model contains a table with planned changes in stock per item. I want to add a column to this table which contains the accumulated stock changes for this item until the date of the current row. I am sure there must be an easy way to do this, but I haven't found the right way yet. Can anyone help me?
Here is simplified structure of my fact table. It contains various items which have multiple planned changes. There can be several changes on the same item at the same date (see line 4 and 5). In order to calculate the planned stock level at the date shown on the current row, I want to sum all changes until the date in the current row. The Running Total column shows the desired result. FYI: date format is d-m-yyyy