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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III
Specialist III

Retrieving Column Name along with value

Hi Shong,
Hope you are doing good!
I have this requirement ...
Table1
------------------------------------
|ID|column1|column2|column3|
------------------------------------
|10|1.23 | 234.32 |987.45 |
------------------------------------
This Table1 will be TRANSFORMED into
Table2
----------------------------------
|ID|KEY |VALUE |
----------------------------------
|1 |column1 | 1.23 |
----------------------------------
|2 |column2 |234.32 |
----------------------------------
|3 |column3 |987.45 |
----------------------------------

So in Simple words its a horizontal to vertical transformation where a single row (with N columns except PRIMARYKEY column ) will be transformed into N rows as key/value pairs where key=columnName and value is the Actualvalue
Can anyone please suggest me any solution on how to get "COLUMNNAME " instead of value in it!
Appreciate any thoughts/solution on this.
Thanks
Madhu Prasad Paridi
Labels (2)
4 Replies
Anonymous
Not applicable

Hello
See a related 6441.
Best regards

shong
_AnonymousUser
Specialist III
Specialist III
Author

Thanks Shong!!. I Appreciate your help.
Regards
Madhu Prasad Paridi
Anonymous
Not applicable

I also have the same requirement. I have looked at the linked topic and can get the column names displayed to the console, but that does not pivot the row to create multiple rows.
Is there a mechanism for generatign the output detailed:
Input Flow:
------------------------------------
|ID|column1|column2|column3|
------------------------------------
|10|1.23 | 234.32 |987.45 |
------------------------------------
Output Flow:
----------------------------------
|ID|KEY |VALUE |
----------------------------------
|1 |column1 | 1.23 |
----------------------------------
|2 |column2 |234.32 |
----------------------------------
|3 |column3 |987.45 |
----------------------------------
Thanks in advance
alevy
Specialist
Specialist

Try tUnpivotRow from the Exchange or tSplitRow. There are many posts about these.