Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am creating a dimension field in qlik app sheet and on that i want to take number of days between 2 dates minus Saturday and Sunday. It means i want only count of working days excluding weekend.
Please help to know how i can achieve it as i am new to qlik.
Thanks in advance
Use NetWorkdays (BeginningDate, EndDate) or if you have custom holidays then use NetWorkDays(BeginningDate, EndDate, <list of holidays> )
Please check the Help site NetWorkDays might be the answer:
Use NetWorkdays (BeginningDate, EndDate) or if you have custom holidays then use NetWorkDays(BeginningDate, EndDate, <list of holidays> )
Please check the Help site NetWorkDays might be the answer:
Thanks for your prompt answer but the prob is, when i am calculating difference between 2 days excluding weekend using network days then, for example-
resolve_Date:11/7/2019 11:12:30 AM and
open_date : 11/5/2019 3:13:56 PM
date(NetWorkDays(date(Open_Date,'MM/DD/YYYY'),date(Resolve_Date,'MM/DD/YYY'))
-Result is coming -3 days (not considering exact hours)
but when i am using
date((date(Resolve_Date,'MM/DD/YYY')-date(Open_Date,'MM/DD/YYYY'))
result :1.832338( which is exact calculation of hours but inclusing weekend)
so basically i want to exclude sat and sun between open_date and resolve_Date, but i want to calculate exact hours.
Please help...
NetWorkDays will always be larger than endate-startdate as it is including both start and end in the count. If you don't want this behaviour you will need to adjust your interval by 1 in the start or end date.
If you only have resolve and open dates during mon-fri then you could substract the number of weekend days from your expression.
[Total time interval]-[No of Weekend days]
No of weekend days you can calculate like this:
FLOOR(ResolveDate) +1- FLOOR(OpenDate) - NetWorkDays(OpenDate,ResolveDate )