Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
DipeshVadgama
Partner - Creator II
Partner - Creator II

Workdays ??

Hi All,

I have a date & number_of_days. I want a output Date+Number_of_days = Actual Date (Excluding Saturday & Sunday)

Excel have a formula called Workday, but I not able to calculate in Qlik sense.

Eg.

   

DateNo. DaysActual Date
12-Oct-16-111-Oct-16
12-Oct-16-111-Oct-16
17-Oct-16219-Oct-16
18-Apr-16-511-Apr-16
7-Apr-16-34-Apr-16
6-Apr-16-431-Mar-16
22-Jun-16123-Jun-16
19-Jan-16425-Jan-16
10-Feb-16-35-Feb-16
8 Replies
Not applicable

yes Lastworkday function available in qlik

DipeshVadgama
Partner - Creator II
Partner - Creator II
Author

I did try, found that it give correct output for + ve No.of day's but not for -Ve No.of day's

+Ve give correct dates

-Ve give -

Gysbert_Wassenaar

If(Date > [Actual Date], NetworkDays([Actual Date], Date)*-1, NetworkDays(Date, [Actual Date]))


talk is cheap, supply exceeds demand
DipeshVadgama
Partner - Creator II
Partner - Creator II
Author

Thank bro, But my output is Actual Date Field !!!

DipeshVadgama
Partner - Creator II
Partner - Creator II
Author

I'm searching for a function or solution to add a variable amount of workdays to another variables date. I see functions as FirstWorkDay, Lastworkday and netWorkDay  but neither of them is the solution for me.

For example:

10/12/2016  - 1(days) =  10/11/2016.

10/12/2016  + 1(days) =  10/13/2016.

1/19/2016  + 4(days)   =   01/25/2016

1/19/2016 - 4(days)   =   01/13/2016

How can i do this in Qlikview?

Gysbert_Wassenaar

Oh, right. Well, in that case use either firstworkdate or lastworkdate depending on whether No. Days is positive or negative. Use an if statement for that and the absolute value of No. Days as second parameter to the lastworkdate or firstworkdate function.


talk is cheap, supply exceeds demand
DipeshVadgama
Partner - Creator II
Partner - Creator II
Author

You made my day, Cheers 🙂 Thanks.

its working perfectly.