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

How to transpose values from a table and group them by a field?

Hello,

This might be too easy to put on the forum but I'm in a bit of a rush. Would be grateful for a helping hand.

I've got a table such as this:

NameA
BC
Jack50100150
Jill255075

I need to transform this table at load time to look like this:

Name
ValueType
Jack50A
Jack100B
Jack150C
Jill25A
Jill50B
Jill75C

Here's the inline code for the input table:

Table1:

Load * inline [

Name,A,B,C

Jack,50,100,150

Jill,25,50,75

];

Thank you, guys!

Sam.

1 Reply
Miguel_Angel_Baeyens

Hi Sam,

This should work:

Table1Final:

CrossTable (Type, Value)

Load * inline [

Name,A,B,C

Jack,50,100,150

Jill,25,50,75

];

The resulting table should have three fields, Name, Type and Value, and values in rows transposed.

Hope that helps.

Miguel