Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Checking Previous Date

Hi

Every day I get a report that contains list of materials and updated delivery date of these materials (see table below)

Item# is unique number for each material 

Arrival Date: Is the date when the item will arrive to warehouse.

Update File Date: The date of the Update file.

Arrival Date Change: This is a column that I would like to add where I show the change in delivery date. It will subtract the arrival date - in previous update file - from the latest arrival date -in the latest update file-.

Latest Arrival Date Change: This captures the arrival date from the Latest update file.

 

Just two notes here:

1) Looking at item # 82012969. The item is not present in 2022-09-06 file. Hence, the latest date would be 2022-09-05 and it will compare it with previous file update.

2) Looking at the same item # 82012969 (and others). The updates don't come daily. You can see update file on 2022-09-05 and the previous one is on 2022-09-02

 

 

Item#Arrival DateUpdate File DateArrival Date Change (days)Latest Arrival Date
302212962022-09-132022-09-0602022-09-13
302212962022-09-132022-09-0202022-09-13
302212962022-09-132022-08-3102022-09-13
302212962022-09-132022-08-3002022-09-13
302212962022-09-132022-08-2902022-09-13
727090672022-09-212022-09-0202022-09-21
820129692022-10-012022-09-0512022-10-01
820129692022-09-302022-09-0212022-10-01
820129692022-09-302022-08-3112022-10-01
820129692022-09-302022-08-3012022-10-01
820129692022-09-302022-08-2912022-10-01
820134142022-10-032022-09-06172022-10-03
820134142022-09-162022-09-02172022-10-03
820134142022-09-162022-08-29172022-10-03

 

  • Anonymous ,based on what I got

     two new columns

     

    Lastest arrival date = maxx(filter(Table, [Item #] = earlier([Item #])  ) , [Arrival Date])

     

    Diff = datediff([Arrival Date], [Lastest arrival date], day)

1 Reply

  • Anonymous ,based on what I got

     two new columns

     

    Lastest arrival date = maxx(filter(Table, [Item #] = earlier([Item #])  ) , [Arrival Date])

     

    Diff = datediff([Arrival Date], [Lastest arrival date], day)