Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Using NetWorkDays to subtract one date from another

Hello everyone,

I use =NetWorkDays to see the difference from one date to another. It works great for the main part.

I want to compare the Order Date and the Receive Date between tables in order to see the lead time. However, in some cases  the Order Date is higher than the Receive Date. Since Networkdays checks the difference, it gives me false data in some cases.

Therefore I want to subtract the Receive Date with the Order Date to make sure that I get the right values. Then I can filter out the negative values.

Now I use =NetWorkDays([Last receive date],[Order date]). The format of the dates are 13-07-2017 (receive) and 06-07-2017 (order),

Is there some way to use it more like =NetWorkDays([Last receive date] minus [Order date]).?

Thank you

2 Replies
sunny_talwar

May be like this

If([Last receive date] > [Order date], -NetWorkDays([Order date], [Last receive date]), NetWorkDays([Last receive date], [Order date]))

Anonymous
Not applicable
Author

Hey, that's a really smart solution! I did not think of doing it like that.

Thanks a lot!