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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Load Script

Hi,

I want to do a calculation in the load script which says sum(workinghourscalc) for each individual workflow id.

I have calculatd the workinghourscalc in my load script by taking each individual status in 1 workflow and calculating the working hours calculation  for the time it has been in each status.

i now want to sum(workinghourscalc) for each individual workflow id in the load script.

How do i do this?

Thanks

Laura

10 Replies
jagannalla
Partner - Specialist III
Partner - Specialist III

Hello,

I think this code will help you. Kindly see attached file for your reference.

T1:

LOAD WorkflowID,Date#(StatusStartDate,'DD/MM/YY') as StatusStartDate,Date#(EndDate,'DD/MM/YY') as EndDate,Description;

LOAD * Inline [

WorkflowID,StatusStartDate,EndDate,Description

1,1/11/12,2/11/12,NewCase

1,2/11/12,4/11/12,PreOrderCheck

1,5/11/12,7/11/12,OrderApproved

1,7/11/12,,OrderClosed

1,4/11/12,5/11/12,Query

2,5/11/12,,Query

2,1/11/12,2/11/12,NewCase

2,4/11/12,5/11/12,OrderApproved

];

MAP1:

Mapping

LOAD Num(WorkflowID)&'-'&Num(StatusStartDate) as Key,Description Resident T1;

T2:

LOAD WorkflowID,ApplyMap('MAP1',Num(WorkflowID)&'-'&Num(Date(Max(StatusStartDate),'DD/MM/YY'))) as CurrentStatus Resident T1 Group By WorkflowID;

Cheers!!

Jagan Nalla