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

Rows to columns

I have two Columns

Month                Price

-------                 ---------

Jan                    5

Feb                   4

Mar                  10

...

I want the rows to be columns and the output table should be as below:

Jan       Feb        Mar

---         ------       -------

5           4            10

what am I supposed to use? A cross table or Generic load? Please give me the load script for this conversion.

15 Replies
sunny_talwar

In the script or front end would also work?

sunny_talwar

Look at the attached for front end options

Anonymous
Not applicable
Author

No Sunny! I am already doing this on my front end using the expressions. It is very simple at that level. But my requirement needs me to do this at the script level, which is kind of messy.

Colin-Albert

Is your chart a Straight Table chart?

Horizontal is on the Properties, Presentation screen.

Tick the box to transpose rows & columns.

horizontal.JPG

Anonymous
Not applicable
Author

Hi Sunny,

I am able to get the values in the front end already. But I need to achieve something for which, building this conversion in the script is important.

I have the following columns in a table:

Month             Price

-------              --------

Jan 2016           50

Feb 2016          60

Mar 2016          34

...

...

-------------------------

I need the month rows to become columns as below:

Jan 2016      Feb 2016        Mar 2016

------------      --------------        --------------

50                    60                 34

The data is being loaded from existing table. So it is a resident load.

I just need to achieve this.

Not applicable
Author

Got it Colin, thanks!!!!!!