Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

NetWorkDays with exclusion of holidays in script possible?

Hi All,

is it possible to exclude list of holidays from NetWordDays function in Script?

Note: list contains company holidays of 2 years. so cant process this in Chart expression..

Please suggest.

Thanks & Reagrds

Jyothi

1 Solution

Accepted Solutions
Highlighted
Not applicable

Re: NetWorkDays with exclusion of holidays in script possible?

Below code worked fine!

tblHoliday:

LOAD Day as Holiday

FROM

(.....Filename.)

/************** varHoliday **************/

tmpTbl:

NoConcatenate

LOAD Chr(39) & Concat(Holiday,Chr(39)&','&Chr(39))&Chr(39) as fieldHoliday

Resident tblHoliday;

LET varHoliday = Peek('fieldHoliday',0,'tmpTbl');

and then using below function inside table load:

NetWorkDays([Start Date],[End Date],$(varHoliday)) as WorkingDays

View solution in original post

4 Replies
Highlighted
Champion III
Champion III

Re: NetWorkDays with exclusion of holidays in script possible?

Yes, you can use newtworkdays() in the script.

Yes, you can use any number of holidays in chart expression as well.

And, see this: Calculating Holidays in script

Highlighted
Not applicable

Re: NetWorkDays with exclusion of holidays in script possible?

Hi Mike,

Thanks for sharing the informative post.

I already have an external file with list of holidays which is updated every year.

could you please suggest how do i modify the script to accommodate this?

Thanks & Reagrds

Jyothi

Highlighted
Champion III
Champion III

Re: NetWorkDays with exclusion of holidays in script possible?

No, I can't, because I don't know your application... or at least your script.

Highlighted
Not applicable

Re: NetWorkDays with exclusion of holidays in script possible?

Below code worked fine!

tblHoliday:

LOAD Day as Holiday

FROM

(.....Filename.)

/************** varHoliday **************/

tmpTbl:

NoConcatenate

LOAD Chr(39) & Concat(Holiday,Chr(39)&','&Chr(39))&Chr(39) as fieldHoliday

Resident tblHoliday;

LET varHoliday = Peek('fieldHoliday',0,'tmpTbl');

and then using below function inside table load:

NetWorkDays([Start Date],[End Date],$(varHoliday)) as WorkingDays

View solution in original post