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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

network days problem

Hi ,

Below is the table

Tab:

Date1          Date2               Id

01/01/2016    01/05/2016     01

01/02/2016    01/09/2016     02

01/04/2016     01/12/2016     03

02/02/2016     04/05/2016     04

03/05/2016     02/01/2016     05

04/06/2016     01/15/2016     06

04/27/2015     03/14/2016     07

03/03/2016     03/05/2016     08

above two dates from two different tables (tab1: contains date1 and id  && tab2: date2 and id) are linked to master calender . now. i need network days between date1 and date2 if i select month .

example:

if i select jan, then i need to pull all jan month records and see if the network days between those two dates is less 5 then show the id.

Thanks,

anusha

9 Replies
Anonymous
Not applicable
Author

example:

if i select jan, then i need to pull all jan month records and see if the network days between those two dates is less 5 then show the id.

swuehl
MVP
MVP

How have you linked the two field to a single master calendar where you chose the month from?

Anonymous
Not applicable
Author

sorry .. its two tables ...

tab1: contains date1 and id

tab2: contains date2 and id

both the two tables are joined on id and i have created a link table to link date with master calender ..

settu_periasamy
Master III
Master III

Maybe like Attached

Anonymous
Not applicable
Author

Thanks....

but , i need id whose difference of dates excluding weekend <5 for a particular month .

swuehl
MVP
MVP

What's exactely wrong with the solution settu_periasamy suggested?

I've noticed that some id shows date1 after date2, so you may need to check this

=if(NetWorkDays(Date1,Date2)<5 and Date1<= Date2, Only(Id))

And Networkdays() will count working days including both start and end, so you may want to add +1 to the start date:

=if(NetWorkDays(Date1+1,Date2)<5 and Date1<= Date2,Only(Id))

Anonymous
Not applicable
Author

Hi,

i used the below logic considering start date is less then end date .

if(NetWorkDays('$(vAb1)','$(vAb)')>5, only(id)) or if(NetWorkDays('$(vAb1)','$(vAb)')<5, only(Key4))

but when i select any month .. i getting count 0 for both of them ..

Kindly help me ..

swuehl
MVP
MVP

Where does Key4 field come from?

If you want to calculate the absolute difference between the two dates:

=if(NetWorkDays(RangeMin(Date1,Date2),RangeMax(Date1,Date2))<5, Only(Id))

Anonymous
Not applicable
Author

key4  is id ..

if(NetWorkDays('date1','date2')>5, only(id)) or if(NetWorkDays('date1','date2')<5, only(id))


thanks,