Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Exclude Holiday from NetWorkDays

Hi,

I have a very helpful expression I got from the community that returns the number of work-days since the beginning of the month:

=NetWorkDays (Date# ('9/1/2014', 'M/D/YYYY') , Today())

But it does not account for company holidays.

I do have a column called COMPANY_HOLIDAY with values Y or N.

I would like to add the COMPANY_HOLIDAY Y into the expression so it would NOT count a NetWorkDay if it is flagged as a Y in COMPANY_HOLIDAY.

I tried this, but returned nothing...

=NetWorkDays (Date# ('9/1/2014','M/D/YYYY'), COMPANY_HOLIDAY = 'Y'), Today())

I would welcome ideas.

JV

1 Solution

Accepted Solutions
anbu1984
Honored Contributor III

Re: Exclude Holiday from NetWorkDays

Check this

4 Replies
anbu1984
Honored Contributor III

Re: Exclude Holiday from NetWorkDays

Check this

sundarakumar
Valued Contributor II

Re: Exclude Holiday from NetWorkDays

PFA. I have created a variable which stores the holidays in the required format for a table. Please use the same variable as the third argument toexclude them for calculating the network days..

Hope this helps..

-Sundar

kushalthakral
Contributor II

Re: Exclude Holiday from NetWorkDays

Hi Jon

we have also faced the same problem and company give us list of  days every month with yes and no like you

We have used simple count function to get the total working days and holidays

like count({<Cloumn>='Y'>}Days)

Regards

Kushal Thakral

Not applicable

Re: Exclude Holiday from NetWorkDays

Thank- you Anbu,

The formula:

=''&NetWorkingDays (Date#('9/1/2014','M/D/YYYY'),Today(),$(=Concat(chr(39)&If(COMPANY_HOLIDAY='Y',Date)&Chr(39),',')))

Works just fine.  It returns an integer ( the number of working days from the beginning of the month excluding weekends and holidays) that I can use in subsequent expressions.  Thanks again,

JV

Community Browser