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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Display rows as columns and viceversa using Script

Hi all,

    I am loading data from QVD's and the user wants the values to be displayed in columns rather than in rows which happens in traditional tables. For example,


Table:(Current)

Country       Code           Sales

America       USA            2000

Australia       Aus             2500

Germany      Gmy            3000


Should be displayed as


Table:(Expected)

Country        America           Australia             Germany

Code            USA                Aus                    Gmy

Sales            2000                2500                   3000


and this has to be done only in the script not in visualization. I've tried crosstable, transpose function but nothing helped me completely.

12 Replies
Anonymous
Not applicable
Author

Then again, are you getting the field names displayed over there and in the resultant table?

Anonymous
Not applicable
Author

Here are the screenshots of the enable transformation step and the resultant table. As you can see no field names displayed.1.PNG

2.PNG

Anonymous
Not applicable
Author

Hi All,

  I've tried storing the qvd into the csv format based on the suggestions posted in the community and used the csv file to transpose the data and it seems to be working fine. Thank you all for the help.