Skip to main content
Question

I would like to create a column where the date of the last invoice for a given vendor is shown against another invoice date.

  • June 23, 2023
  • 1 reply
  • 0 views

for a given vendor we have an invoice date and I would like to find the date of the last invoice relative to this current date. 

So for example we have date of invoice for given vendor 2.01.2023 and I would like to find date of last invoice for same vendor, that is for example 1.01.2023.

In celonis I would like to have in one column the date of the "current invoice" and in the other column the date of the previous invoice 

  • June 23, 2023

Hi Julia,

 

LEAD( Invoice_Date_Column , ORDER BY ( Invoice_Date_Column DESC ) , PARTITION BY ( Vendor Column ) ): this will give the date of the last invoice relative to the last date.

PS: If for every date there is a new invoice Id so that will work fine, if you have an invoice Id with different Dates and you just want the second last date so you need to add theINVOICE_ID_Column in the Partition By Field


Reply