Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

Number of days worked or not worked between two dates

Hello, Do you know how to identify a number of working days or not between two dates? thank you in advance
fabien

1 Solution

Accepted Solutions
Highlighted
Contributor III
Contributor III

I don't know exactly what "a" and "b" mean in your context, but you can use "vList" in expressions as well, like this:

=NetWorkDays(dateliv,datecreat,$(vList))

View solution in original post

7 Replies
Highlighted
Specialist
Specialist

For no  of work days use following :

networkdays (start_date, end_date [, holiday])


e.g.

networkdays (01/01/1018, date(today()))



Highlighted
Creator III
Creator III

There is a function to do what you need. Here you have more information:

https://help.qlik.com/en-US/sense/June2018/Subsystems/Hub/Content/Scripting/DateAndTimeFunctions/net...

Highlighted
Creator
Creator

When i write

networkdays(datecrea,dateliv,'08/05/2018') it's ok

but when it's this formule

networkdays(datecrea,dateliv,joursferies) is not ok

the table for "joursferies"

JoursFeriesTmp:
LOAD * Inline [JoursFeries

01/01/2018
02/04/2018
01/05/2018
10/05/2018
08/05/2018
21/05/2018
14/07/2018
15/08/2018
01/11/2018
11/11/2018
25/12/2018
]
;

Highlighted
Contributor III
Contributor III

Hello, pirotfab


You can do something like this ...


JoursFeriesTmp:

LOAD Concat(chr(39) & JoursFeries & chr(39), ',') As List

Group By Key;

LOAD *,

           1 As Key

Inline

[JoursFeries

01/01/2018

02/04/2018

01/05/2018

10/05/2018

08/05/2018

21/05/2018

14/07/2018

15/08/2018

01/11/2018

11/11/2018

25/12/2018

];

Let vList = Peek('List');

...and use the variable "vList" as the list of holidays, like this:

Load Networkdays('01/01/2018', '25/12/2018', $(vList)) As DaysWorked

Autogenerate(1);

Highlighted
Creator
Creator

Hello,

I can't do it

in a i want 4 and b 3.

Thanks

Highlighted
Contributor III
Contributor III

I don't know exactly what "a" and "b" mean in your context, but you can use "vList" in expressions as well, like this:

=NetWorkDays(dateliv,datecreat,$(vList))

View solution in original post

Highlighted
Creator
Creator

thank you for you help.

it's ok