Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Cumulative computation between dates

Hello all,

 

I'm having some troubles on forecasting when a given material is going to have obsolencence problems.

 

This is the data I have:

First, I have a table with the actual stock and the obsolencence date for each material:

Material codeObsolencence dateActual stock
00125-07-2022          2.300.000
00224-06-2022        14.502.000
00312-09-2022                21.530
00402-06-2022          4.845.623
00504-09-2022          2.312.451
00607-12-2022                   1.545

 

Second, I have another table with the forecasted consumtions on each date for each material:

Material codeQuantity to be consumptedDate
0015018-03-2022
00210018-03-2022
00315018-03-2022
00510018-03-2022
00640018-03-2022
00135018-03-2022
00615218-03-2022
00362019-03-2022
00560019-03-2022
00223519-03-2022
006154520-03-2022
001362520-03-2022
00615020-03-2022
00625020-03-2022
00535021-03-2022
00615021-03-2022
00526521-03-2022
00632121-03-2022
00589021-03-2022

 

So I'm having troubles on computing the sum of forecasted consumptions for each material before each obsolescence date.

 

As an example of material 001, would be all lines that matches material code 001 and is always before the obsolescence date:

 

Does anybody know hoy could I compute this, please?

 

Thanks a lot in advance.

 

 

 

2 Replies