Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

May 18th 10AM ET, Live Chat, bring your QlikView questions. REGISTER
Showing results for 
Search instead for 
Did you mean: 
Contributor III
Contributor III

Excluding Every Friday from NetWorkdays()

Dear All,

As you all know ...the networkday() function excluding saturday and sunday from TAT calculation. However i want to exclude friday also or the day which i want to exclude from TAT calculation...

is there any way to achieve this ...if yes how i can implement the same.

help would be much appreciated...


3 Replies

Hi Sarfaraz,

In this case, you can use third parameter holiday list in Networkdays() function. First, create a load script to capture all Fridays and store them in a variable. After doing that, you can use the variable in Networkdays() function as third parameter. Here is an example,

Let vMinDate = Num(MonthStart(Today()));

Let vMaxDate = Num(Today());


Load Concat(Chr(39) & Date & Chr(39) ,', ' ) as Date Where Weekday(Date)='Fri';

Load  Date($(vMinDate)+iterno()-1) as Date

Autogenerate 1 While $(vMinDate) + Iterno() -1 <= $(vMaxDate);

Let vHoliDays = Peek('Date',0,'Holiday')

Drop table Holiday;

Now, you can use the variable like Networkdays(StartDate, EndDate. $(vHoliDays))

In above example, I just took current month start date as start date and today's date as end date for understanding. You can find vMinDate and vMaxDate from your source table like below,



     Min(DateFieldName) as MinDate,

     Max(DateFieldName) as MaxDate

Resident SourceTableName;

LET vMinDate = Peek('MinDate');

LET vMaxDate = Peek('MaxDate');

Drop Table Temp;

You can concatenate holiday list other than Friday  (as well)  in holiday table.

Hope this helps.

Specialist II
Specialist II


Follow this link:

Master Calendar with Working days &amp; Holidays Flag

Hope it helps!!