Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
_fl
Contributor
Contributor

Load txt file with 2 different width format

Hi All,

I need to analyse a .txt file in which there are 2 different row format, so I can't load it specifying a unique width with @:@ (below i tried to simplify in a table the INPUT file structure and the expected OUTPUT).

 

INPUT
Product   Product1_name   Description   Date A   Date B
List   a   b   c   d
List   e   f    g   h
List   i    l    m  n
Product   Product2_name   Description   Date A   Date B
List   a   b   c   x
Product   Product3_name   Description   Date A   Date B
List   e   f   g   h
List   i   l   x   x

OUTPUT
Product1_name Description Date A Date B a b c d e f g h i l m n
Product2_name Description Date A Date B a b c x
Product3_name Description Date A Date B e f g h i l x x

 

For each row starting with 'Product' there are n rows below starting with 'List', where n is variable.

I need to find a way to concatenate each 'Product' row with the 'List' rows immediately below.

Can you please help me with this task?

Thank you!

 

1 Reply
Brett_Bleess
Former Employee
Former Employee

I am not really following what you have here, which I assume may be the reason you have not received any other posts.  About the best I can do for you is to point you to the Design Blog area of the Community, there are hundreds of how-to posts out there, you may be able to find something that will help you here.

https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog

The tricky part is finding the search terms to find things, I generally start with a single word and see what comes up and look for other words there etc...  Hopefully this allows you to move forward a little, my post will kick things back up, so there is a chance someone else will have another look and maybe come up with something else.  The best thing I could recommend is posting one of your text files, or portions of them etc., so folks can see what you actually have, that will likely help in this case.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.