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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
rishind
Contributor III
Contributor III

Transpose row values

Hi everyone,

I want to transpose rows as per below

Input

Name,ID001,ID002,PD001,PD002

A,5,4,2,3

A,8,7,6,9

A,9,8,1,2

A,3,4,5,6

Output

Name,ID,PD,Value

A,5,2,1

A,8,6,1

A,9,1,1

A,3,5,1

A,4,3,2

A,7,9,2

A,8,2,2

A,4,6,2

How can I achieve this in Talend

2 Replies
pakapi_
Creator
Creator

Hi rishind,

 

I don't know how more complicated is your real example, but for this, just try:

 

0693p000009rGFkAAM.png

In tFixedFlowInput is your input from example

first tFiltercolumn filters only Name,ID001,PD001

second tFiltercolumn filters only Name,ID002,PD002

then in tMap we are translating our field's names to Name,ID,PD,Value, and adding "1" in Value field in first tMap, and "2" in Value field in the second tMap

then we are using tUnite to connect flows

 

Is it what you want ?

rishind
Contributor III
Contributor III
Author

Thanks @Kamil Kowalczyk​ for your reply.

Well there are about 10 columns for each field like ID001,ID002....ID010 and PD001,PD002....PD010.

So the logic for column Value is calculated like if ID003 AND PD003 are transposed then Column value has 3 and so on

Also if ID001...10 or PD001..10 have zero and they should not be transposed.