I am new to KNIME and I am stuck with below issue.
I have two tables as below, Table B is sort by date, and two tables have the duplicate Material number, if Table A.Material (first) = Table B.Material, till A.Quantity - B.Quantity <=0, fill in the corresponding date in Table A, then the calculation of Table A.Material (second) starts with the balance of the last one.
Column E is the calculate logic if my description is not clear.
@Chupas welcome to the KNIME forum. I fear I do not completely understand your logic.
Maybe you could provide the data instead of a screenshot and do a morde detailed explanation of the logic. And also take into account if there are different scenarios (more Material numbers).
And from a quick check I do not understand on the right side how you come about the numbers if there should be a ‘countdown’ to zero?
My advise would be to think thru the logic and come up with a more detailed description, maybe set out the rules a bullet points so it is easier to follow and explain one example in more details.
I think I understood what you are looking for, I was able to follow what you have in E, but you should help come up with the logic. I mean, regardless if you were not doing this in Knime or not, how would you define the rules?
There is a cumulative aggregation involved per Material, but it’s kinda mixed by date. The logic needs to be clearly defined in order to implement it.
All of the logic to assign the values is done via the Java Snippet. I borrowed that Java Snippet from one of @takbb 's reply in another thread (This is similar to assigning budget to transactions).
Hi @bruno29a,
Thanks a lot!
There are some difference with my expected output as my explanation is not clear.
But I found the solution which you mentioned in @takbb 's reply (Allocate txn to budget 2.knwf).
It works after I change the left- right relationship of two tables.
Thanks again.