New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

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.

 Date No. Days Actual Date 12-Oct-16 -1 11-Oct-16 12-Oct-16 -1 11-Oct-16 17-Oct-16 2 19-Oct-16 18-Apr-16 -5 11-Apr-16 7-Apr-16 -3 4-Apr-16 6-Apr-16 -4 31-Mar-16 22-Jun-16 1 23-Jun-16 19-Jan-16 4 25-Jan-16 10-Feb-16 -3 5-Feb-16
8 Replies
Valued Contributor

Not applicable

Re: Workdays ??

yes Lastworkday function available in qlik

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
Contributor

Re: Workdays ??

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

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
Contributor

Re: Workdays ??

You made my day, Cheers :-) Thanks.

its working perfectly.