Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to form a table from 2 listboxes containing different attributes

I have 2 listbox containing these values.

Listbox1
NAME
ADDRESS
TELEPHONE

Listbox2
ALEX
JOHN
EMILY
New York
London
Trenton

8923492929

8234234334
3434392929

I need to form the table like this:

NAMEADDRESSTELEPHONE
ALEXNew York8923492929
JOHNLondon8234234334
EMILYTrenton3434392929

I could only separate the rows of listbox1 using

LOAD listbox as NAME  FROM [./address] where listbox1 like 'NAME';


How can i separate rows of listbox2? Any ideas?


Thank you


2 Replies
sunny_talwar

What is the source of your data? This is something you would want to resolve in the script, right?

Anonymous
Not applicable
Author

Hey.. Sorry I was not clear about my source of the data. My source was from an xml file which i then added into excel to look like this because it seem more better for me.

I  think i found the answer from this post Converting rows into multiple columns | Qlik Community which worked for me.

Though I have a question. I am attaching my sample excel file which is similar to this one and I want to group the data in the format like this.

IDNAMEGROUPS
123William1
123William23423
12314RAJ1
12314RAJ312
12314RAJ34
12314RAJ3242
23232John32
23232John43223
23232John122344
23232John1321

Load RowNo() as link, A as [ID]

FROM [SAMPLE>XLSX](ooxml, no labels, table is Sheet2)

where B = 'ID';


Left Join LOAD RowNo() as link, A as [NAME]

FROM [SAMPLE>XLSX](ooxml, no labels, table is Sheet2)

where B = 'NAME';

I was able to join the ids and names using above method but since there are multiple groups, this technique is not working for groups. Can you suggest something?