Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

synthetic Key related problem

Hi Everyone,

Here as below in both table we have two key { key and Key1} on the basis of two key we want to link both table and should not create the synthetic key . Means both table should be connect with key and Key1.

Is it possible?

Please anyone help me.

Thanks

Master:

LOAD USER_ID & DealerCode as key,

      USER_ID&DealerCode&DealerType as Key1,

     USER_ID,

     USERNAME,

     DealerCode,

     DealerName,

     State,

     City,

     Region,

     DealerType

FROM

MasterTable.xlsx

(ooxml, embedded labels, table is master);

//**********************Transaction Table*********************

Transaction:

Left Keep LOAD USER_ID&DealerCode as key,

     USER_ID&DealerCode&DealerType as Key1,

     USER_ID,

     DealerCode,

     DealerType,

     Date(DATE,'DD-MM-YYYY') AS DATE,

     Amount,

     Quantity,

     Tax

FROM

Tab1.qvd

(qvd);

12 Replies
preminqlik
Specialist II
Specialist II

yes i agree with neha ...according to my understanding , your master has one to one data , so for example for every dealer type also there is only one dealer must be there ...so understand the concept...you just conncet thorugh "Key1"(as you did already ) thats it.....

arsal_90
Creator III
Creator III

Please use this to overcome with your problem i make a link table

Transaction1:

Load

  userid & ‘_’ & dealercode & ‘_’ & date as Key1,

amount

FROM Transact1;

Transaction2:

Load

  userid & ‘_’ & dealercode & ‘_’ & date as Key2,

quantity

FROM Transact2;

Transaction3:

Load

  userid & ‘_’ & dealercode & ‘_’ & date as Key3,

dealerType,

Tax

FROM Transact3;

LinkTable:

Load DISTINCT

  userid & ‘_’ & dealercode & ‘_’ & date as Key1,

userid & ‘_’ & dealercode & ‘_’ & date as Key2,

  userid & ‘_’ & dealercode & ‘_’ & date as Key3,

  userid,

dealercode,

date

FROM Transact1;

LinkTable:

Load DISTINCT

userid & ‘_’ & dealercode & ‘_’ & date as Key1,

userid & ‘_’ & dealercode & ‘_’ & date as Key2,

  userid & ‘_’ & dealercode & ‘_’ & date as Key3,

  userid,

dealercode,

date

FROM Transact2;

LinkTable:

Load DISTINCT

  userid & ‘_’ & dealercode & ‘_’ & date as Key1,

userid & ‘_’ & dealercode & ‘_’ & date as Key2,

  userid & ‘_’ & dealercode & ‘_’ & date as Key3,

  userid,

dealercode,

date

FROM Transact3;

arsal_90
Creator III
Creator III

Concatenation Method

Transaction1:

Load

Userid &’-‘& Dealercode as Key,

//Userid,

// Dealercode,

Date,

Null() as Tax,

Null() as quantity,

amount

FROM Transact1;

Transaction2:

Load

Userid &’-‘& Dealercode as Key,

// Userid,

//Dealercode,

Date,

Null() as Tax,

Null() as amount,

quantity

FROM Transact2;

Transaction3:

Load

Userid &’-‘& Dealercode as Key,

  //Userid,

// Dealercode,

Date,

Tax,

Null() as amount,

Null() as quantity

//dealerType

FROM Transact3;

Master:

Load

Userid &’-‘& Dealercode as Key,

userid,

dealercode,

state ,

region,

city,

UserName,

DealerName ,

dealerType From Master;

If still have problem then please share your qvw with dumy data and also output what you want