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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Paknanarn23
Creator II
Creator II

I want to take StartDate's First Time - StopDate's Last Time.

Paknanarn23_0-1691119306023.png

I want to take First Time of StartDate - Last Time of StopDate where KcePart1 WorkOrder1 is the same, but the layers don't have to be the same. What should I do?

2 Replies
SajjaAshokVardhan
Contributor
Contributor

Please try the below code.
 
ScanMV:
LOAD 
    DATE, 
     kcePart1, 
     WorkOrder1, 
     Layer, 
     StartDate,
     StopDate
     
FROM
[C:\Users\HP\Downloads\Paknanarn23_0-1691119306023.xlsx]
(ooxml, embedded labels, table is Sheet1);
 
Result:
load Distinct kcePart1,
WorkOrder1,
 
date(min(StartDate),'DD/MM/YYYY hh:mm:ss') as StartTime,
  date(max(StopDate),'DD/MM/YYYY hh:mm:ss') as StopTime
  Resident ScanMV 
  Group by kcePart1,WorkOrder1;
  

Screenshot (7).png

Paknanarn23
Creator II
Creator II
Author

I want to take StartDate - Stopdate to find the Doentime value.