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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Network Days Calculation

Dear Team,

i am using below variable to get previous 5 days back date

=date(max([Trading Date])-5)

So the above return me : 9/21/2014 if max([Trading Date]) is 9/26/2014.

but i want previous 5 days back Working Date i.e. 9/19/2014.

The same like above i have to use for getting 200 days back network date for analysis purpose.

Kindly let me know how can i do that.

Thanks & Regards,

Jitendra Kumar Vishwakarma.

1 Solution

Accepted Solutions
Ralf-Narfeldt
Employee
Employee

You can use the FirstWorkDate function

=date(max(firstworkdate([Trading Date],5))


This link is to the Qlik Sense help topic for the function, but it works the same:

http://help.qlik.com/sense/2.0/en-US/online/#../Subsystems/Hub/Content/Scripting/DateAndTimeFunction...


View solution in original post

3 Replies
maxgro
MVP
MVP

maybe with the function firstworkdate

this is from QlikView help

firstworkdate(end_date, no_of_workdays {, holiday} )

Returns the latest starting date to achieve number_of_workdays (Monday-Friday) ending no later than end_date taking into account any optionally listed holidays. End_date and holiday should be valid dates or timestamps.

Ralf-Narfeldt
Employee
Employee

You can use the FirstWorkDate function

=date(max(firstworkdate([Trading Date],5))


This link is to the Qlik Sense help topic for the function, but it works the same:

http://help.qlik.com/sense/2.0/en-US/online/#../Subsystems/Hub/Content/Scripting/DateAndTimeFunction...


Not applicable
Author

Thanks Ralf Narfeldt