Forum Discussion
Uspace87
Resolver III
3 years agoAdding Working days to Order Created date
Hi everyone, I would like to calculate a Shipping Date (Deadline) for WebOrders adding the Shipping condition and skipping not working days like Weekend and Public Holidays. Order C...
- 3 years ago
hi Uspace87
Not sure if i fully get your, you may try to add a column like this:
EOD - NextWorkingDay = VAR _date = [OrderDate] RETURN MINX( FILTER( data, data[OrderDate]> _date && NOT WEEKDAY(data[OrderDate], 2) IN {6, 7} && NOT [OrderDate] IN VALUES(Holiday[Holidays]) ), data[OrderDate] )tried and it worked like this:
the holiday table:
FreemanZ
Super User
3 years agohi Uspace87
Not sure if i fully get your, you may try to add a column like this:
EOD - NextWorkingDay =
VAR _date = [OrderDate]
RETURN
MINX(
FILTER(
data,
data[OrderDate]> _date
&& NOT WEEKDAY(data[OrderDate], 2) IN {6, 7}
&& NOT [OrderDate] IN VALUES(Holiday[Holidays])
),
data[OrderDate]
)
tried and it worked like this:
the holiday table:
Uspace87
Resolver III
3 years agoThat is brilliant thank you, I had to add some other logic but that formula is perfect! Thank you very much!