Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
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