Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

akuttler
Contributor

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.

Tags (1)
1 Solution

Accepted Solutions

Re: Count Business Days

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))

5 Replies

Re: Count Business Days

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
Valued Contributor

Re: Count Business Days

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
Contributor

Re: Count Business Days

Thanks! Works great.

akuttler
Contributor

Re: Count Business Days

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

Re: Count Business Days

How about all the holidays?

Community Browser