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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Pico
Partner - Creator
Partner - Creator

Full transpose of a table

Hi, I need to fully transpose my table. I have two Columns: key and value, with 12 values.

I need the 12 to-be-columns to be called as the relative "Key" column values, and the values of each to-be-column (only 1 value per column) to be the "values" column values.

I tried Generic Keyword but it creates distinct tables, and it's a problem since i don't know (and cannot know) the future column name a-priori. (i'm thinking roght now to a loop cycling trough the distinct names of the columns and use them as variables to create the join, but I really hope it exists a smarter way!)

Example

before:

KeyValue
Attribute_Name_1Value_1
Attribute_Name_2Value_2
Attribute_Name_3Value_3

 

After:

Attribute_Name_1Attribute_Name_2Attribute_Name_3
Value_1Value_2Value_3


Thank you

 

 

Labels (1)
3 Replies
Or
MVP
MVP

If there's always 12 values, I would just brute force it instead of working through the issue with variables or similar solutions (concatenating the values and using SubField, perhaps?). 

Load Key as Field1, Value as Value1 From Table where WildMatch(Key,'*_1');

Concatenate

Load Key as Field2, Value as Value2 From Table where WildMatch(Key,'*_2');

etc.

marcus_sommer

There are surely various manually ways to transform the table but I think you should not disregard the generic approach too easily else considering it as base to extend/adjust it to your needs. Therefore take a more closely look on the possibilities: The Generic Load - Qlik Community - 1473470