Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

IAMDV
Honored Contributor II

*** Rows to Columns... Is it Generic Load? ***

Dear All,

I have some data in rows and I need to convert them into columns to display in Table Box (without performing any aggregations). Do I need to use Generic Load or Is there any simple approach to transpose the data? I'm attaching some fictitious data for your reference. It will be great if someone can help me with this request.

Please check the Input Table and we need to convert the script to accomodate Output Table...

Note : There is not Unique/Primay Key within the data.

Many thanks in advance.

Cheers,

DV

www.QlikShare.com

2 Replies
MVP
MVP

Re: *** Rows to Columns... Is it Generic Load? ***

Hi DV,

not sure if this is the best solution, but I would try something like

INPUT:

LOAD Field1,

     Field2,

     Field3,

     Field4,

     Measure

FROM

[.\Rows to Columns.xlsx]

(ooxml, embedded labels, table is [Input Table]);

 

For i = 1 to FieldValueCount('Measure')

Let a = FieldValue('Measure',$(i));

left join (INPUT) LOAD

'$(a)' as Measure,

'$(a)' as $(a)

AutoGenerate 1;

Next

drop field Measure;

Have a nice weekend,

Stefan

Not applicable

Re: *** Rows to Columns... Is it Generic Load? ***

Community Browser