Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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

Labels (1)
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

tresB
Champion III
Champion III

Try like:

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

Peter_Cammaert
Partner - Champion III
Partner - Champion III

See this document

Peter

jagan
Partner - Champion III
Partner - Champion III

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!