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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
userid128223
Creator
Creator

consolidate files based on group column

Hi Everyone

I have input excel file with following info.

Course#
Student#
S123456
P245334
S123S545
P245D345
Z5565667
S123S23245
Z556T0343567

I have script that generates individual files for all student# in .txt format. However my requirement is to create 1 file combined based on by associated Course#.

For example. My script create individual files like below for each student#.

456YYYYMMDD.txt

S545YYYYMMDD.txt

S23245YYYYMMDD.txt

I need to combined the output of each student# based on their course#.

output of above should be combined into 1 file and file named S123.txt

15 Replies
settu_periasamy
Master III
Master III

try to change the field names like below screen shot.

Capture.JPG

tamilarasu
Champion
Champion

Hello Ami,

My bad. Settu has pointed out my mistake. Let us know If there is any issues.

Hi Settu,

Thanks for correcting me

userid128223
Creator
Creator
Author

Thank you very much Tamil & Settu

userid128223
Creator
Creator
Author

Hi Tamil

One question on your solution.

Let vFileDate = Peek('Temp',0,'Table');

what was the purpose of doing above in the script?

tamilarasu
Champion
Champion

Hello Ami,

Kindly check the word document for understanding.

tamilarasu
Champion
Champion

If you want to generate output files on a daily basis, you should make a small change in the script. Attached is the solution for it.

Kindly check and let me know If you have any questions or clarifications on this.