Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Convert Rows to Columns

Hi All,

I need a help in converting rows to columns at script level.

The number of rows converting to columns will be always fixed but the value may change.

The data is



LOAD * INLINE [
Loc, Brand, Value
A, 101, 10
A, 102, 15
A, 103, 12
A, 104, 16
B, 101, 15
B, 102, 18
B, 103, 22
V, 104, 13
];

The out put should be

Loc101102103104
A10151216
B15182213


Thnaks in advance.

Cheers,

7 Replies
Not applicable
Author

you can use a pivot table

see the attached image:

deepakk
Partner - Specialist III
Partner - Specialist III

hi,

Why do you need to do it at script level. We can easily do it front end.

Create a pivot table and add the dimensions. NOw drag the required field to top of the expression and you will find the required output.

Let us know if you still want to do it at scipt level.

Not applicable
Author

Hi Thanks for your reply.

I have have other filed to drag into pivot table and moreover these values will be inbetween some dimension columns.

So, that is the reason I asked to develop at script level.

Once again thanks.

Cheers,

suniljain
Master
Master

Pls try with Try with Transform.

suniljain
Master
Master

Dear Deepak,

We cannot perfrom all task at front end. it also have limitation.

Not applicable
Author

Dear All,

I think this will be quite easy at front end level only.

above that it will benificial for all of us if we get any script for the same.

can some one share it.

hector
Specialist
Specialist

Hi, I also recommend use the pivot table to achieve your desired result but you can try with the Generic Load

See the image and tell us if this is what you want

With this method, every value of Brand will be splited in several columns with it's value as a name

Rgds