I have two tables that I have managed to merge using the join function in the script editor.
Now I want to have an extra column in this table that should be calculated as the number of times that a certain criteria is met. The problem is that the two fields involved in the calculation come from different tables (the ones that have been merged).
Here's the example:
SKU DATE Qty Planned Qty Real OTIF
A 01 2 3 1
B 01 4 3 0
C 01 5 5 1
The OTIF logic is the following: if Real is equal or higher than Planned then it's 1, if not is 0. Qty Planned and Qty Real each come from different tables.
What I try to do is to apply this calculation in the script load but I don't know where to put it in the load order. I always get the message that one field is missing (because Planned and Real come from diff tables).