What I need is to select the date and shift when the total inventory (39000) is less than the aggregated Scheduled number. So I think what I need is another column that accumulates the total of Scheduled based on the last row's value. The Total Inventory number is a static number and should not be aggregated whereas the Scheduled number is not. So my first issue is how to aggregate that number (running total) and the second issue will be to select just that one date and shift when the Inventory value falls below the aggregated value.
Can you give an example of what your output would be for this example input? Do you need a running total of Scheduled for each date or over the whole dataset?every day is a school day