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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

negative days in networksdays

I use the networkdays to calculate the number of days between two dates

NetWorkDays(Confirmed_Date,Invoice_Date) as Diff,

All is fine as long as the difference is a positive number, but when it is a negative number all I get is -1, irrespective of the actual difference.

What can i do to get the actual negative number of days.

Thanks!

1 Reply
syed_muzammil
Partner - Creator II
Partner - Creator II

Hi,

You can try this.

if(Confirmed_Date<Invoice_Date,

NetWorkDays(Confirmed_Date,Invoice_Date,

-NetWorkDays(Invoice_Date,Confirmed_Date)), as Diff

Regards,

Syed.