Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
IAMDV
Luminary Alumni
Luminary Alumni

*** 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
swuehl
MVP
MVP

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