Filter for orders with DN created in last 48 hours

I need to create a filter for Orders on an OLAP table where the delivery note was created in the last 48 hours, and I am struggling with it. Should I use EventTime or something else?

(I am new to Celonis, so any advice helps)

Thanks!

Hi @wmighell94

You can use HOUR_NOW() to get the timestamp of the current hour, and HOURS_BETWEEN to get the time difference between now and the delivery note timestamp:

FILTER HOURS_BETWEEN(delivery_note_timestamp, HOUR_NOW()) <= 48.0;

Now I don’t know where the delivery note timestamp is. If it’s an activity in the activity table, you can pull it to the corresponding Order (I assume this is your case) with a PU_FIRST:

PU_FIRST("Orders", "Activities"."Eventtime", "Activities"."Actvitiy" = 'Delivery Note Created')

But this depends on your data model, and where this delivery note time can be found.

Best
David