Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@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)

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@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)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.