Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Concatenate in loop problem

I am having a problem to concatenate three fields in a loop to one table.

I am using this code 

 

let vPrefix = 'NEW:
NOCONCATENATE';

for each i in FieldValueList('GROUP')


for each j in FieldValueList('ELEMENT')

$(vPrefix)

Load
'$(j)' as $(i)
AutoGenerate 1
;

let vPrefix = 'CONCATENATE(NEW)';

next j

next i

 

 

and as a result I get this kind of table:

a    
b    
c    
  d  
  e  
  f  
    g
    h
    k

 

How can I get this table:

a d g
b e h
c f k

 

Labels (1)
2 Replies
SunilChauhan
Champion II
Champion II

instead of concatenate Join simply and why we need loop.

only thing we should have some key column to join

Sunil Chauhan
Anonymous
Not applicable
Author

Thanks for quick answer.

I need loops because I must make new table from another table automatically, cannot make any keys manually.

Using a Join function instead of concatenate I get similar mess.