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: 
lmit
Creator II
Creator II

Group the records

Hi All,

I have a input file like below

col1;col2;col3;……col10

1;a;1

1;b;5;

2;c;10

1;d;3

2;e;9

i have to group the records based on col1 and sort with col3

the output should be like

col1;col2;col3;…….col10

1;a;1;

1;d;3;

1;b;5;

2;e;9;

2;c;10;

rest of the other records in the file should remain same

please anyone have any suggestions

thanks in advance,

lmit

Labels (2)
3 Replies
Anonymous
Not applicable

Hi

I think just use a tSortRow to sort the rows by col1 and col3 columns can fit your needs.

 

Regards

Shong

lmit
Creator II
Creator II
Author

Hi @Shicong Hong​ ,

 

Thanks for your reply , yes sort worked

 

But i have to separate the records which are having only date , lets say my input is like

0695b00000YCKweAAH.pngand my output should have 2 flows like

first flow should records like

0695b00000YCKzEAAX.pngand second flow should be like

0695b00000YCL0vAAH.pngthe first flow is because it has only one date and one records in the whole file

the second flow will have other records in sorted ordered

 

i tried using taggregatrow component with count function but got error message like "cannot be processed because of incompatible input and/or out columns

 

Any suggestions would really apricate

 

Thanks,

lmit

Anonymous
Not applicable

I guess you don't use the tAggregaterow component correctly. In this example, you need to store the output into memory using tHashOutput after tSortRow for used in next subjob, for example:

0695b00000YCUJrAAP.png0695b00000YCUK6AAP.png0695b00000YCUKBAA5.png0695b00000YCUKGAA5.png 

tHashInput1 link with tHashOutput1, and has the same schema as tHashOutput1;

tHashInput1 link with tHashOutput2, and has the same schema as tHashOutput2;

 

Regards

Shong