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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
capriconuser
Creator
Creator

Days difference including holidays qlikview

HI all

here i am trying to get total days including weekend between fromdate and todate.. 

script

 

LOAD Id, 
     LeaveType, 
     OwnerName, 
     Date(CreatedDate,'DD/MM/YYYY') as LeaveDate, 
     Month(CreatedDate) as LeaveMont,
     Year(CreatedDate) as LeaveYear,
     Week(CreatedDate) as LeaveWeek, 
     From as fromdate, 
     To as todate
FROM
L_sheet.xlsx
(ooxml, embedded labels, table is Le25);

 

 this is what i am trying 

 

networkdays (Leaves.From,Leaves.To)

 

but here i get days without weekend.. 

 

Capture.JPG

when i do just

 

(Leaves.From - Leaves.To) 

 

 

then i get  this 

Capture.JPG

 

whereas i want include weekend days also .. 

 

how i do this 

 

Labels (2)
8 Replies
mahaveerbiraj
Creator II
Creator II

hi try this,

 

 

fabs(FLOOR(Interval(Date(Leaves.From,'DD-MMM-YYYY') - date(Leaves.To,'DD-MMM-YYYY'),'d')))

 

tresB
Champion III
Champion III

Instead of  From - To, I guess you need To - From, i.e.

(Leaves.To - Leaves.From)

 

capriconuser
Creator
Creator
Author

then this shows me only negative numbers.. nothing changed

capriconuser
Creator
Creator
Author

@tresB  i mean nothing changed i still did not get whole date using this approch 

leaves.to - leaves.from

capriconuser
Creator
Creator
Author

@mahaveerbiraj  still nothing changed .. still i did not get some data using this approch

tresB
Champion III
Champion III

If you use:  =leaves.to - leaves.from

how does your output look like? Also let know your expected output.

Edit: In the meanwhile, you can try below as well:

=Interval(leaves.to - leaves.from, 'D'

capriconuser
Creator
Creator
Author

@tresB  the output which i already posted in 2nd picture in question

tresB
Champion III
Champion III

Try to add two more expression in your chart, like:

=leaves.to - leaves.from   

 and

=Interval(leaves.to - leaves.from, 'D')

and share the output (screen shot) for them. Or, try to share your sample app.