Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
cooper_yonk
Contributor III
Contributor III

Network days

Good morning

Could anyone help me with this please.

I have a list of bank holidays in excel and I want to use them in my script in conjunction with network days.

,if(IsNull(CompletedDate),NetWorkDays(CreatedDate,today())-1,NetWorkDays(CreatedDate,CompletedDate)-1) as WorkingDays_calc;

 

Ive seen that I can add a variable to this formula to exclude public holidays.  My question is how do I use the bank holiday dates in my spreadsheet with this formula

 

Any help would be appreciated.

Labels (2)
2 Replies
mikaelsc
Specialist
Specialist

create a variable containing all your holidays... 

Holidays: 

load 

dateHoliday

from SourceExcelHolidays; 

 

Concat: 

load 

Chr(39)&concat(dateHoliday,Chr(39)&','&Chr(39))&Chr(39)   as concatenatedHolidays

resident Holidays; 

let vVariable_containing_all_holidays = peek('concatenatedHolidays',0,'Concat');

drop table Concat; 

 

then you should be able to use it: 

load

*,

networkdays(Date1,Date2,$(vVariable_containing_all_holidays ))  as NetworkdaysValue

from SourceDataThingStuff; 

https://help.qlik.com/en-US/qlikview/May2022/Subsystems/Client/Content/QV_QlikView/Scripting/DateAnd... 

cooper_yonk
Contributor III
Contributor III
Author