Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have table where I have two columns. One column with the shipment date and the other with transport delays (in days) I would like to create a column where I will calculate the receipt time but only by adding working days since there's no transport during non working days.
Thank you
Hello,
you can use a formula like this:
networkdays(Order_Date,Delivery_Date)
Hello,
I would like to add working days to the date not count the number of working days between two dates.
Thank you 🙂
Try this
ReceiptDate = WorkDate([Shipment Date], [Transport Delays])
It didn't work. 😞
Take a look here: firstworkdate - script and chart function | Qlik Cloud Help
Hi @Loki13,
I would try achieving this through the backend.
The best idea that I've got right now would be to create a table containing all working days and then use FieldIndex() and FieldValue().
If you created a table called 'WorkingDays' with a field called 'Work_Date' the calculation might look something like so:
FieldValue('Work_Date', FieldIndex('Work_Date', ShipmentDate) + Delay) as ReceiptDate
It would only work if all the shipping dates are working days as well.
Hope this helps!
There is already in nearly all scenarios such a table - the master calendar. Just adding there a 0/1 workingday-flag against querying weekends/holidays and then accumulating this value against the month/year/calendar-start/... and then using these information in n mappings, like:
m1: mapping load Date, RunningWorkingday from Calendar;
m2: mapping load RunningWorkingday, Date from Calendar;
t: load *, applymap('m2', Delay + applymap('m1', Date, null()), 'myDefault') as ReceiptDate
from X;