Example, there are machines that processes and produced materials, is there a way to track the output of machine becoming the input of another, and counting how many passes the process took? here is the example desired output (pass column):
Record# | machine | input | output | pass | material |
---|---|---|---|---|---|
1 | 1 | 40422041 | 40422041 | 1 | ABC74008000 |
2 | 2 | 40422041 | 40422041 | 2 | ABC74004200 |
3 | 3 | 40422041 | 40422041 | 3 | ABC74002100 |
4 | 4 | 40422041 | A40422041 | 4 | ABC74001200 |
5 | 4 | 40422041 | 40422041 | 4 | ABC74001200 |
6 | 5 | 40422041 | M421200629 | 5 | ABC73000660 |
7 | 6 | A40422041 | M521200827 | 5 | ABC73000660 |
8 | 6 | A40422041 | M521220239 | 6 | ABC73000660 |
notice records 1,2,3,5 & 6 = these are all coming from input 40422041. records 4,7 & 8 are results of A40422041 which was an output of 40422041, thus the pass is needed to be 4 on record # 4, and continued as pass 5 and 6 on records 7 & 8.
How can the pass sequence be achieved?