Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

zahidrahim_ocp
Contributor

Use column from other table

Dear Experts,

I want to make a composite key from two joined tables so that i can use this composite key to join with my 3rd table. Below is the example:

cm_cmpt_dtl:

Load PERIOD_ID,

INVENTORY_ITEM_ID,

CMPNT_COST

from  [LIB://QVD/cm_cmpt_dtl.qvd] (qvd);

GMF_PERIOD_STATUSES:

INNER Join (cm_cmpt_dtl)

Load CALENDAR_CODE,

PERIOD_ID,

PERIOD_CODE

FROM [LIB://QVD/gmf_period_statuses.qvd] (qvd);

Now i want to have a composite key LIKE

PERIOD_CODE&'~'&INVENTORY_ITEM_ID in GMF_PERIOD_STATUSES table


Regards,


Zahid Rahim



1 Solution

Accepted Solutions
pradosh_thakur
Valued Contributor III

Re: Use column from other table

cm_cmpt_dtl:

Load PERIOD_ID,

INVENTORY_ITEM_ID,

CMPNT_COST

from  [LIB://QVD/cm_cmpt_dtl.qvd] (qvd);

INNER Join (cm_cmpt_dtl)

//GMF_PERIOD_STATUSES:

Load CALENDAR_CODE,

PERIOD_ID,

PERIOD_CODE

FROM [LIB://QVD/gmf_period_statuses.qvd] (qvd);

joined_table:

load *,PERIOD_CODE&'~'&INVENTORY_ITEM_ID as composite_key_name

resident cm_cmpt_dtl;

drop table cm_cmpt_dtl;



2 Replies
mdmukramali
Valued Contributor II

Re: Use column from other table

Hi,

After Join you can Load Resident load and create a composite Key

pradosh_thakur
Valued Contributor III

Re: Use column from other table

cm_cmpt_dtl:

Load PERIOD_ID,

INVENTORY_ITEM_ID,

CMPNT_COST

from  [LIB://QVD/cm_cmpt_dtl.qvd] (qvd);

INNER Join (cm_cmpt_dtl)

//GMF_PERIOD_STATUSES:

Load CALENDAR_CODE,

PERIOD_ID,

PERIOD_CODE

FROM [LIB://QVD/gmf_period_statuses.qvd] (qvd);

joined_table:

load *,PERIOD_CODE&'~'&INVENTORY_ITEM_ID as composite_key_name

resident cm_cmpt_dtl;

drop table cm_cmpt_dtl;