Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Loki13
Contributor II
Contributor II

Add working days to a date

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

Labels (1)
7 Replies
Clement15
Partner - Specialist
Partner - Specialist

Hello,

you can use a formula like this:
networkdays(Order_Date,Delivery_Date) 

networkdays - script and chart function | QlikView Help

Loki13
Contributor II
Contributor II
Author

Hello, 

I would like to add working days to the date not count the number of working days between two dates.


Thank you 🙂 

Chanty4u
MVP
MVP

Try this 

ReceiptDate = WorkDate([Shipment Date], [Transport Delays])

 

Loki13
Contributor II
Contributor II
Author

It didn't work. 😞 

lennart_mo
Creator
Creator

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!

marcus_sommer

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;