Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Highlighted
mazacini
Contributor 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
Highlighted
marcuspersson
New Contributor III

Re: Combine csv header data into body of table

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

View solution in original post

7 Replies
Highlighted
Not applicable

Combine csv header data into body of table

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

Highlighted
mazacini
Contributor III

Combine csv header data into body of table

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

Highlighted
marcuspersson
New Contributor III

Re: Combine csv header data into body of table

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

Highlighted
mazacini
Contributor III

Combine csv header data into body of table

Hi Marcus

Thanks for response. Unfortunately I am using personal edition.

Could you send me script only?

Ta

Joe

Highlighted
marcuspersson
New Contributor III

Re: Combine csv header data into body of table

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

View solution in original post

mazacini
Contributor III

Combine csv header data into body of table

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.

Highlighted
marcuspersson
New Contributor III

Re: Combine csv header data into body of table

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