Skip to main content
Announcements
Qlik Announces Qlik Talend Cloud and Qlik Answers: LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
brindlogcool
Creator III
Creator III

Mapping Comma separated values

I have a tables as

Table 1

key1, Key2, value

1 , 1 , A

1 , 2 , B

1 , 3 , C

2,  1 , G

2,  2 , H

3,  1 , T

3,  2 , V

3,  3 , X

3,  4 , A

3,  5 , B

3,  6 , C

3,  7 , D

Table 2

Key, Values

1 ,  10,20,30

2 ,   7,2,9

3 ,   6,20,12,7,3,12,10

I need to map values in the table 2 to the key2 column in the table A in the same order. Assuming  10 mapped to 1, 20 Mapped to 2 and 30 Mapped to 3 .. it will be same order...

So the final table would be

Table 3

key1, Key2, value ,values

1 , 1 , A , 10 

1 , 2 , B , 20

1 , 3 , C , 30

2,  1 , G , 7

2,  2 , H , 10 

3,  1 , T  , 6

3,  2 , V  , 20

3,  3 , X  , 12

3,  4 , A  , 7

3,  5 , B  , 3

3,  6 , C  ,12

3,  7 , D  ,10

2 Replies
m_woolf
Master II
Master II

See the attached qvw.

I don't understand the 2,2,H,10 line shown for Table3.

brindlogcool
Creator III
Creator III
Author

Sorry that was a mistake in the sample.. corrected as below

Table 1

key1, Key2, value

1 , 1 , A

1 , 2 , B

1 , 3 , C

2,  1 , G

2,  2 , H

3,  1 , T

3,  2 , V

3,  3 , X

3,  4 , A

3,  5 , B

3,  6 , C

3,  7 , D

Table 2

Key, Values

1 ,  10,20,30

2 ,   7,2

3 ,   6,20,12,7,3,12,10

Table 3

key1, Key2, value ,values

1 , 1 , A , 10

1 , 2 , B , 20

1 , 3 , C , 30

2,  1 , G , 7

2,  2 , H , 2

3,  1 , T  , 6

3,  2 , V  , 20

3,  3 , X  , 12

3,  4 , A  , 7

3,  5 , B  , 3

3,  6 , C  ,12

3,  7 , D  ,10