Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

dmv15956
Contributor

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
varshavig12
Valued Contributor

Re: Workdays ??

Not applicable

Re: Workdays ??

yes Lastworkday function available in qlik

dmv15956
Contributor

Re: Workdays ??

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 -

Re: Workdays ??

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


talk is cheap, supply exceeds demand
dmv15956
Contributor

Re: Workdays ??

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

dmv15956
Contributor

Re: Workdays ??

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?

Re: Workdays ??

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
dmv15956
Contributor

Re: Workdays ??

You made my day, Cheers :-) Thanks.

its working perfectly.

Community Browser