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

Creating key field

Hi

If I have a list of supplier numbers and a list of customer numbers how can I create a key field which combines the two for every combination?

eg

Supplier

123

456

789

Customer

987

654

321

results in a table like this

CustSupp

987-123

987-456

987-789

654-123

654-456

654-789

321-123

321-456

321-789

Thanks

4 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Join the 2 sets of data then the rusult will be a table with 2 fields, reload it with a third field doing:

Load Field1 & '-' Field2 resident Table;

marcus_sommer

If this is only for a key you should use this from Alexandros17 suggested field-joining within an autonumber:

Load *, autonumber(Field1 & '-' Field2) as Key resident Table;

- Marcus

sasiparupudi1
Master III
Master III

Try

Supplier&'-'&Customer as CustSupp

maxgro
MVP
MVP

Supplier:

load * inline [

Supp

123

456

789

];

Customer:

load * inline [

Cust

987

654

321

];

TmpCustSupp:

NoConcatenate load Supp Resident Supplier;

join (TmpCustSupp) load Cust Resident Customer;

CustSupp:

load

  *,

  Cust & '-' & Supp as CustSupp

Resident TmpCustSupp;

DROP Table TmpCustSupp;