Invoice # | Order # | Customer # | Item # | Item QTY |
100001 | 1001 | 10 | XB33 | 2 |
100335 | 1021 | 10 | XB33 | 6 |
103009 | 1103 | 10 | XB33 | 3 |
<tbody>
</tbody>
Very small sample table. But let's say I wanted to add 2 columns to this.
The first one would be labeled: Reorder?
What I'm looking to accomplish with this is to signify that rows 2 and 3 are re-orders of an item first ordered in row 1 (my data has invoice dates ordered oldest to newest, as well as several hundred of rows in between each potential re-order). Anything can go into the field.. Y, 1, True, anything.
The next field would be labeled: Reorder Time
If it's a reorder then I would like it to calculate the time difference between the current row's Invoice date and the invoice date from the last data row order/reorder of that item.
HELP