Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

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
Employee
Employee

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

Hi,

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

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

Regards

Not applicable

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

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

MVP
MVP

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

what's the search process?

Not applicable

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

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

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

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

Not applicable

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

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

Not applicable

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

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?

MVP
MVP

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

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

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

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

Community Browser