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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
sirivis24s
Partner - Contributor
Partner - Contributor

How to calculate difference using single date field

Hi All,

I am New to QlikView  I have data like

Change datechanger Old assigned to New Assigned toOld statusNew StatusNameDTAT
11/1/2020Sujan  Darrielle New--
11/4/2020Darrielle DarrielleSujanNewNeed More infoDarrielle3
11/4/2020Sujan SujanDarrielleNeed More infoOpenSujan1
11/4/2020Darrielle DarrielleDhruvOpenOpenDarrielle1
11/12/2020Dhruv DhruvDhruvOpenFixedDhruv7
11/15/2020Dhruv DhruvSujanFixedReady to retestDhruv2
11/21/2020Sujan Sujan Ready to retestClosedSujan5

 

I need to Calculate  no of days between dates for eg

changed date is 11/1/2020 to 11/4/2020  then DTAT is 3 excluding Saturday's and Sundays .below is criteria 

 

 

Thanks

Sujan.s

11 Replies
Taoufiq_Zarra

@sirivis24s  I used from the Excel file this expression:

SampleData:

load *,networkdays(Date(peek(AU_DATE)),Date(AU_DATE)) as DTAT;

LOAD AU_ENTITY_ID, 
     AU_USER, 
     AU_DATE, 
     AP_OLD_VALUE, 
     AP_NEW_VALUE//, 
    // DTAT
FROM
.\Defects_History.xls
(biff, embedded labels, table is Sheet1$);

 

and this is the output :

Capture.PNG

Make sure that :

SET DateFormat='M/D/YYYY';

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
sirivis24s
Partner - Contributor
Partner - Contributor
Author

Hello Taoufiq,

I have tried it but notworking  can you try this excel in your machine