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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

transpose a file: invert rows in columns

Here is the structure of the file :
id|country_code|Country_name
1,2,3|cm,fr,us|Cameroon,France,United States

We want to transform it to something like :
id|country_code|Country_name
1|cm|Cameroon
2|fr|France
3|us|United States

 

That's just a sample, the file we have is 6000 items

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Here is how I handle the issue :

0683p000009LyXF.jpg

I use tJavaFlex to split each row0683p000009LyXK.jpgThat the data generated 0683p000009LyJK.jpg

View solution in original post

2 Replies
Anonymous
Not applicable
Author

Here is how I handle the issue :

0683p000009LyXF.jpg

I use tJavaFlex to split each row0683p000009LyXK.jpgThat the data generated 0683p000009LyJK.jpg

Anonymous
Not applicable
Author

you can achieve this with help of tnormalizerow and numeric sequence routine.

using tnormalizerow and sequence routine  you will have to generate following 

id seq  country code seq      country_name seq

1  1       cm                  1         cameroon        1

2  2       fr                     2         france              2

3  3        fr                     3         united states   3

 

after this you can perform join operation on seq column 

and you will get

 id|country_code|Country_name
1|cm|Cameroon
2|fr|France
3|us|United States

 

This is applicable for n number of records