Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
akuttler
Creator
Creator

Count Business Days

Hello,

I am trying to create a variable that counts distinct business days in a year.

Count(NetWorkDays('01-01-2017', '12-31-2017', '01-02-2017', '05-29-2017', '07-04-2017', '09-04-2017', '11-23-2017', '12-25-2017' ))

However it gives me "0"

Thanks.

1 Solution

Accepted Solutions
sunny_talwar

Try this

NetWorkDays(MakeDate(2017), MakeDate(2017, 12, 31), MakeDate(2017, 01, 02), MakeDate(2017, 05, 29), MakeDate(2017, 07, 04), MakeDate(2017, 09, 04), MakeDate(2017, 11, 23), MakeDate(2017, 12, 25))

View solution in original post

5 Replies
sunny_talwar

Try this

NetWorkDays(MakeDate(2017), MakeDate(2017, 12, 31), MakeDate(2017, 01, 02), MakeDate(2017, 05, 29), MakeDate(2017, 07, 04), MakeDate(2017, 09, 04), MakeDate(2017, 11, 23), MakeDate(2017, 12, 25))

zebhashmi
Specialist
Specialist

Or change your format maybe like that

NetWorkDays('01/01/2017', '12/31/2017', '01/02/2017','01/02/2017', '05/29/2017', '07/04/2017', '09/04/2017', '11/23/2017', '12/25/2017' )

Regards


akuttler
Creator
Creator
Author

Thanks! Works great.

akuttler
Creator
Creator
Author

How would I alter the expression to count working days for all data and not just '2017'?

sunny_talwar

How about all the holidays?