Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Highlighted
Not applicable

Key Logic

Dear All,

Please tell me how to make Key between 2 tables having data as::

Table A:

Header 1Header 2Header 3
aa01200
bb01300
cc06300
dd08200

Table B:

Header 1Header 2Header 3
aa06800
bb, aa01300
cc, dd02700
dd08900

I have to make Key between Table A and Table B with Header 1 column...Plz show me the right way to do that...

4 Replies
Highlighted
Not applicable

Re: Key Logic

hi

TableA:

load

* from TableA;

TableB:

load

subfield(Header1,',') as key

Header2 ,

Header3

from TableB;

Highlighted
vikasmahajan
Esteemed Contributor

Re: Key Logic

PFA sample application Hope this will definitely help you.

Vikas

Highlighted
datanibbler
Esteemed Contributor

Re: Key Logic

Hi Rahul,

that depends on which record from table_B you want to get joined/ linked to which record in table_A.

Generally, you can split the strings (pieces of text) in that header_field by using either of the string functions

- LEFT()

- RIGHT

- SPLITFIELD() (might be best if you know that your separator is always a ',')

=> Load the result as a new field which has to have the same name as the field_to_link_to in the other table - QlikView automatically links fields that have the same name.

HTH

Best regards,

DataNibbler

Highlighted
er_mohit
Honored Contributor II

Re: Key Logic

Table1:

load [Header 1] as Key,[Header 2], [Header 3] from table1;

Table2:

load

subfield(Header,',') as Key,

[Header 2],[Header 3] from table 2;