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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
D19PAL
Creator II
Creator II

Pause networkdays and start again

Hi

Just say I had a timestamp called startdate, and I did 

 

Networkdays(startdate,today ())

Say startdate was 01/12/2021

So the count till today 15/12/2021 will be 11.

Just say I wanted to stop that count and start it again on the 20/12/2021

I want the 20th to restart from 11 days so it will be 12 not 14.

 

Thanks

 

 

 

4 Replies
Or
MVP
MVP

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

networkdays (start_date, end_date [, holiday])

Return data type: integer

Arguments:  

Networkdays arguments
Argument Description
start_date The start date to evaluate.
end_date The end date to evaluate.
holiday

Holiday periods to exclude from working days. A holiday period is stated as a start date and an end date, separated by commas.

Example: '25/12/2013', '26/12/2013'

You can specify more than one holiday period, separated by commas.

Example: '25/12/2013', '26/12/2013', '31/12/2013', '01/01/2014'

 

 

Define the values you don't want to include as a holiday.

D19PAL
Creator II
Creator II
Author

I get what you mean, but what if I don't now the holiday dates.

 

Can the holiday be another networkdays(pausedate,today ())

 

?

Or
MVP
MVP

If you don't know the holiday dates, you can't use them in a formula...?

You should be able to use a dynamic calculation of the holiday dates, e.g. it'll accept today() or a field / formula. I haven't ever used this particular functionality so I'd suggest you experiment it with yourself and see what works. This document might help:

https://community.qlik.com/t5/QlikView-Documents/Find-Net-Working-Days/ta-p/1476739

 

 

D19PAL
Creator II
Creator II
Author

That's what I was thinking thanks.