Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How can I merge columns/lists of data into one column or list?

I tried this:

CPT:

LOAD  [Unique Identifier],
[CPT_1] as CPT
RESIDENT Claims;

CPT:
LOAD  [Unique Identifier],
[CPT_2] as CPT
RESIDENT Claims;

CPT:
LOAD  [Unique Identifier],
[CPT_3] as CPT
RESIDENT Claims;

All the fields would appear in one list, but the search process did not work. 

11 Replies
Joseph_Musekura
Support
Support

Hi,

Please check this link. It provides a nice example as well:

http://community.qlik.com/message/266895#266895

Regards

Not applicable
Author

May be:

CPT:

LOAD  [Unique Identifier],
[CPT_1] as CPT,

1 as Source
RESIDENT Claims;
LOAD  [Unique Identifier],
[CPT_2] as CPT,

2 as Source
RESIDENT Claims;
LOAD  [Unique Identifier],
[CPT_3] as CPT,

3 as Source
RESIDENT Claims;


Now you will have one table with a flag 'Source' which will tell you where the data originated from, if thats what you are trying to do.


Hope it helps

maxgro
MVP
MVP

what's the search process?

Not applicable
Author

I think that is a great example, but I unable to get it to work.  What am I doing wrong?

Load * Inline [CPT_1, CPT_2, CPT_3];



CPT:

LOAD [Unique Identifier],

CPT_1 as CPT,

Resident Basis;

CPT:
LOAD [Unique Identifier],
CPT_2 as CPT,

Resident Basis;



Not applicable
Author

I was able to load data that way, but now I have a $Syn problem.

Not applicable
Author

Can you attach a sample file please. Not sure why that would cause synthetic keys.

Not applicable
Author

I want to be able to search all lists/columns inside of one list box so the "or" statement applies not in separate lists where the "and" statement applies.  That is way I am trying to merge all the boxes.

The $syn was triggering off CPT and Unique Identifier.

This list available under Source just let me know which list the code came from.  How would I use that to find a code that appears in one list or one of the other lists?

maxgro
MVP
MVP

I think Ajay has already answered

If not, as it seems all people are answering with the same idea (concatenating and adding a field to identify the source table), I suppose is better to post an extract of your qlikview doc, if you can

its_anandrjs

I believe you already give right concatenate load for all the three tables but if you need a single field may be if i understand the requirement you can concat the fields like Field1&Field2. For your load statement see the script.

CPT:

LOAD  [Unique Identifier] & [CPT_1] as CPT
RESIDENT Claims;

CPT:
LOAD  [Unique Identifier] & [CPT_2] as CPT
RESIDENT Claims;

CPT:
LOAD  [Unique Identifier] & [CPT_3] as CPT
RESIDENT Claims;

This will give you single Field with data of [Unique Identifier] & [CPT].

Hope this helps