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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
RaghuDoijoday
Contributor
Contributor

Joining two tables with two keys

Hi Team,

I am new to Qliksense, i need to join two tables with tow different keys to join the tables.

explanation:

i have Incident table and another one is problem table

from incident table ineed to join idnumber column which i s also available in the problem table

in the same i also want to join as another key with services column which is there in problem table

i need to join with two key idnumber and services column to get the output.

Labels (2)
1 Solution

Accepted Solutions
tresB
Champion III
Champion III

Have you tried like:

Incident_table :

Load  
   idnum & services   AS KEY
   idnum,
   group,
   [sub category],
   services
From <>;

JOIN

Problem_table:
Load 
     idnum & services   AS KEY,
     groupdivient
From <>;

View solution in original post

7 Replies
tresB
Champion III
Champion III

So you are looking for a composite key join. If so, you could try creating a KEY field in both tables like below and join on it:

[idnumber column] & [services column]   as KEY

or,

Autonumber([idnumber column] & [services column])   as KEY                   

 

RaghuDoijoday
Contributor
Contributor
Author

No i didnt get the ouput 

eg with sample data

Incident table :

idnum      group           sub category      services

 

Problem table:

idnum        groupdivient               services

 

now i need to join the two tables with two keys

Idnum to idnum and services to services  as  two keys

 

 

 

 

 

 

tresB
Champion III
Champion III

Could you share a sample data/app and explain the expected output in that context?

RaghuDoijoday
Contributor
Contributor
Author

RaghuDoijoday_0-1587552856058.png

 

ineed joing the two tables with two keys

im able to join from a one key, but also want to create another key also 

 

tresB
Champion III
Champion III

Have you tried like:

Incident_table :

Load  
   idnum & services   AS KEY
   idnum,
   group,
   [sub category],
   services
From <>;

JOIN

Problem_table:
Load 
     idnum & services   AS KEY,
     groupdivient
From <>;
RaghuDoijoday
Contributor
Contributor
Author

I got the result Thank you Tresesco

Fran_by
Contributor III
Contributor III

Hi.

Why need  create a composite key?

Why not use "join"  as below?

Incident_table :

Load
idnum,
services
group,
[sub category]
From <>;

JOIN(Incident_table)

Problem_table:
Load
idnum,
services,
groupdivient
From <>;

I test it, "join" work perfect for two dimensions, without composite key.