Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Transpose a physical table

Hi All,

I have a physical table with the following structure:

ID_CLIENT     Date                Cost1     Cost2     Cost3     Cost4

1                    20/12/2013       2               3          1            1

2                    20/12/2013       1               1           1           1

I want to transpose in this table in qlikview:

ID_Client        Date                  cost          Amount

1                   20/12/2013          Cost1          2

1                   20/12/2013          Cost2          3

1                   20/12/2013          Cost3          1

1                   20/12/2013          Cost4          1

2                   20/12/2013          Cost1          1

2                   20/12/2013          Cost2          1

2                   20/12/2013          Cost3          1

2                   20/12/2013          Cost4          1

How should I go about it?

Thanks,

PP

5 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Use a LOAD prefix called CROSSTABLE. Very powerful. There is a wizard for this in the Script Editor. See QlikView help for further information.

Peter

tresesco
MVP
MVP

Try like:

Crosstable( Cost, Amount, 2) Load * From <>;

Peter_Cammaert
Partner - Champion III
Partner - Champion III

See this document

Peter

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try this script using Crosstable()

Data:

CrossTable(CostNo, Cost, 2)

LOAD * INLINE [  

    ID_CLIENT,     Date,                Cost1,     Cost2,     Cost3,     Cost4

1,                    20/12/2013,       2,               3,          1,            1

2,                    20/12/2013 ,      1,               1,           1,           1

];

Regards,

Jagan.

Not applicable
Author

Thanks!