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

Announcements
Discover the Trends Shaping AI in 2026: Register Here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Split dates group by Employee ID

Hello All,

I was trying few different data transformations on dates along with employee id data.

 

Before that, I was able to get the dates between start and end using below flow.

0683p000009M4tS.png

 

tRowGenerator:- 

0683p000009M4wV.png

 

tJavaRow:- 

0683p000009M4wa.png

tJavaFlex:-

0683p000009M4m2.png

The output that i am getting after this is:-

 

 

[statistics] connecting to socket on port 3520

[statistics] connected

30-04-2019|25-04-2019|25-04-2019

30-04-2019|25-04-2019|26-04-2019

30-04-2019|25-04-2019|27-04-2019

30-04-2019|25-04-2019|28-04-2019

30-04-2019|25-04-2019|29-04-2019

30-04-2019|25-04-2019|30-04-2019

[statistics] disconnected

 

Then i tried to do add emp id's to the same and my input data looks like below.

Data:- 

EmpID .       start                 end

128256 10/04/19 15/04/19
128257 15/04/19 25/04/19

 

The Output that iam expecting is:-

0683p000009M4vE.png

 

I tried the same way as above flow,

But i couldnt get the output as i am expecting.

 

Output:-

[statistics] connected

For input string: "EmpID"

25-04-2019|15-04-2019|15-04-2019|128257

25-04-2019|15-04-2019|16-04-2019|128257

25-04-2019|15-04-2019|17-04-2019|128257

25-04-2019|15-04-2019|18-04-2019|128257

25-04-2019|15-04-2019|19-04-2019|128257

25-04-2019|15-04-2019|20-04-2019|128257

25-04-2019|15-04-2019|21-04-2019|128257

25-04-2019|15-04-2019|22-04-2019|128257

25-04-2019|15-04-2019|23-04-2019|128257

25-04-2019|15-04-2019|24-04-2019|128257

25-04-2019|15-04-2019|25-04-2019|128257

[statistics] disconnected

 

The dates are not getting differentiated by EmpID's

 

How can i get this.

 

Please help.

 

Thanks in Advance.

Mohan V.

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi Mohan,
I think you need a tLoop component to achieve it, the job design looks like:
tFileInputDelimited--main-tFlowToIterate--iterate--tJava--oncomponentok--tLoop--iterate--tFixedFlowInput--main--tLogRow
on tJava: populate the number of days between startDate to endDates, this number will be the variable value of To parameter on tLoop component.

tFixedFlowInput: generate the current record.

Can you try and let me know if you need more help?

Regards
Shong

View solution in original post

1 Reply
Anonymous
Not applicable
Author

Hi Mohan,
I think you need a tLoop component to achieve it, the job design looks like:
tFileInputDelimited--main-tFlowToIterate--iterate--tJava--oncomponentok--tLoop--iterate--tFixedFlowInput--main--tLogRow
on tJava: populate the number of days between startDate to endDates, this number will be the variable value of To parameter on tLoop component.

tFixedFlowInput: generate the current record.

Can you try and let me know if you need more help?

Regards
Shong