
Contributor II
2019-04-20
01:47 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Finding Network days for every month,week by by taking holidays table
Hi,
If I have list of holidays as table i e
1/1/2018, 1/13/2018, 1/14/2018, 1/15/2018,3/18/2018, 04/11/2018, 08/15/2018,
12/11/2018, 12/26/2018,
How do I create 2018 dates by using autogenerate and how to find network days by month and week level in in back end
679 Views
2 Replies

MVP
2019-04-20
02:39 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
First you need to convert your holiday field values to a comma separated list like this. (It is possible at create this using script instead of typing as I do here)
Set vL.holidays = '1/1/2018', '1/13/2018', '1/14/2018', '1/15/2018','3/18/2018', '04/11/2018', '08/15/2018', '12/11/2018', '12/26/2018';
Then use the networkdays() when creating a master calendar. Use the date field as both from and to date and the variable above as the third holiday parameter.
Something like this:
For each _date from date('1/1/2018') to date('12/31/2018')
Load
Dayname('$(_date)') as Date,
Year('$(_date) ') as Year,
networkdays ('$(_date) ', '$(_date) ' , $(vL.holidays)) as NoOfWorkdays
Autogenerate 1;
NEXT
Set vL.holidays = '1/1/2018', '1/13/2018', '1/14/2018', '1/15/2018','3/18/2018', '04/11/2018', '08/15/2018', '12/11/2018', '12/26/2018';
Then use the networkdays() when creating a master calendar. Use the date field as both from and to date and the variable above as the third holiday parameter.
Something like this:
For each _date from date('1/1/2018') to date('12/31/2018')
Load
Dayname('$(_date)') as Date,
Year('$(_date) ') as Year,
networkdays ('$(_date) ', '$(_date) ' , $(vL.holidays)) as NoOfWorkdays
Autogenerate 1;
NEXT
Vegar
Qlik Community MVP
Qlik Community MVP
670 Views

Specialist III
2019-04-21
03:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK
TRY
networkingdays(statdate,enddate)
for counting holidays
take
=count(holiday={">=$(startdate)<=$(enddate)"}>} distinct ID)
you need to subtract this number from top Networkingdays
try
Channa
642 Views
