Qlik Community

QlikView Documents

Documents for QlikView related information.

Find Net Working Days

MVP
MVP

Find Net Working Days

Last week I got a question to get number of working days between two dates

  1. Excluding Public Holidays
  2. Including Saturday as Half Working Day
  3. Including Saturday as Full Working Day.

Have done some work and created enclosed QlikView File.

Suggestion and Correction would be highly appreciated !

Tags (1)
Attachments
Comments
carbal1952
Contributor II

I suggest to put holidays dates in an external file (e.g.Excel), because these especial days can vary fron country to country and from year to year (e.g. Argentina).

CB.

Not applicable

I was searching for ages for something like this online, fantastic post and so simple in comparison to other examples on other threads.


Thank you

0 Likes
maahivee
New Contributor III

Hello Guys, I find this one is very helpful, But i have more tricky requirement than this one.

I have to take the sum(Sales) and multiply it by the current working day in the month say today is Aug 5th but working day number is 3. and then divide it by the no of working days in the month which is for Aug 2015 it is 21 days so my equations should be like (Sum(sales)*3)/21.

is there a way i could find out the current working day number and also the no of working days in the month.

0 Likes
Not applicable

Hi Maahivee

You could use num(WeekDay(today())) to get the current day number in the week.

The document on this post will help you with the number of work days left.

Hope that helps,

Aidan

0 Likes
vsap2000
New Contributor

I am looking similar kind but little tricky, I have 3 dates TC_Date, TS_Date, TE_Date. I have to count number of exact days LineDays = Num(Networkdays(Tc_Date,TS_Date)-2 + (1+Frac(Tc_Date) + Frac(Ts_Date),'#0.00')

WkDays = Num(Networkdays(TS_Date,TE_Date)-2 + (1+Frac(TS_Date) + Frac(TE_Date)  ,'#0.00')

TotDays =  Num(Networkdays(Tc_Date,TE_Date)-2 + (1+Frac(Tc_Date) + Frac(TE_Date), '#0.00')

these all expressions gives correct Num of days but if either of Dates fall on weekend I get # of days in negative, it's not calculating correctly.

So my requirement is if TC_Date falls on weekend Saturday use Friday if Sunday use Monday,  TS_Date falls on Saturday/Sunday use next working day that is Monday, TE_Date falls on Saturday/Sunday use Monday, can anyone help me how to add working days to above expression?

Thanks in advance.

Best Regards,

vsap

0 Likes
Version history
Revision #:
1 of 1
Last update:
‎2013-11-11 10:29 AM
Updated by: