Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a field called "Opened_at" and a field "resolved_at". I need to calculate the duration but only M-F, excluding weekends.
Any ideas?
Thanks - Jason
Try something like
if(inweek ( Opened_at, resolved_at, 0 ),
resolved_at - Opened_at, // if in same week this will be difference in seconds
resolved_at - Opened_at - (week(resolved_at)- week(Opened_at)) * 2*24*60*60 // if not in same week this will be difference in seconds minus the number of seconds in intervening weekends
))
I think I might have gotten it, seems there is a "NetworkDays" function in Qlik.
So NetworkDays(startdate, enddate) returns WeekDay duration.
Yes, Networkdays (Startdate, Enddate,
Holidays). Third parameter is holiday.
You can define the holiday list in a variable so
you can change the values for future.