Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
mazacini
Creator III
Creator III

Combine csv header data into body of table

Hi

I have a stock movement report in csv format in following layout.

TAS CSV Qry01.PNG

The problem is the header in line 2 which contains the Item Code and Description for the movements shown (in cells.A2 and B2)

If I load as shown, there will be no assocaition between the Item and the movement data.

This layout repeats for each item on the stock movement file.

I want the data to load as follows:

TAS CSV Qry02.PNG

Any ideas?

1 Solution

Accepted Solutions
marcuspersson
Contributor III
Contributor III

No problem, i placed the script in a txt file (see attached file). /Marcus

View solution in original post

7 Replies
Not applicable

Use the following Script

Load [Cust/Supp],

        Ref1,

        Date,

        Ref2,

        In,

       Out,

      UnitPrice

From Test.XLS (biff,  embedded labels,  table is sheet1$, filters ( Remove (Row, Pos(Top,2))));

Regards,

Venkat Reddy

mazacini
Creator III
Creator III
Author

Hi Venkat

Thank you for your suggestion.

It does not seem to work.

It loads the movement lines, but does not append the Item Code and Description as shown in the second image.

Joe

marcuspersson
Contributor III
Contributor III

Hey, I think you can solve it recursively like this (see attached file). /Marcus

mazacini
Creator III
Creator III
Author

Hi Marcus

Thanks for response. Unfortunately I am using personal edition.

Could you send me script only?

Ta

Joe

marcuspersson
Contributor III
Contributor III

No problem, i placed the script in a txt file (see attached file). /Marcus

View solution in original post

mazacini
Creator III
Creator III
Author

Excellent! Works great.

I understand most of the solution, but I am unsure of the role of Concatenate/Noconcatenate, even though I know it is a fundamental element of Qlikview.

marcuspersson
Contributor III
Contributor III

Im glad it solved your problem. In this case I just wrote noconcatenate inorder to avoid it to autoconcatenate to the inline table. /Marcus