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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
harm_dataspark
Partner - Contributor III
Partner - Contributor III

Link multiple fields in table to other (master) data table

Hi there, I have the following situation//tables:

[Suppliers]:
Load
	SupplierID,
	SupplierName,
	....

[Items]:
Load
	ItemID,
	ItemDescription,
	ItemSupplierID1,
	ItemSupplierID2,
	ItemSupplierID3
	....

 

In the app I want to create an overview of all items including the name of the Supplier1-3. Though a mapping load could be used to solve that one, I also want to be able to select a Supplier and view ALL ITEMS linked to that supplier, whether it is supplier1, 2 or 3.

Any suggestions how to solve that?

1 Solution

Accepted Solutions
AG-gugelbisolutions
Creator II
Creator II

Hi there, I would create a table this way:

ITEM_to_SUPPLIER:
LOAD DISTINCT
	ItemID
	ItemSupplierID1 as SupplierID
RESIDENT Items;

CONCATENATE (ITEM_to_SUPPLIER)
LOAD DISTINCT
	ItemID
	ItemSupplierID2 as SupplierID
RESIDENT Items;

CONCATENATE (ITEM_to_SUPPLIER)
LOAD DISTINCT
	ItemID
	ItemSupplierID3 as SupplierID
RESIDENT Items;

Hope it helps.

View solution in original post

3 Replies
hic
Former Employee
Former Employee

[Items]:
Crosstable (SupplierNo, SupplierID, 2)
Load
ItemID,
ItemDescription,
ItemSupplierID1,
ItemSupplierID2,
ItemSupplierID3
From ...

See also https://community.qlik.com/t5/Qlik-Design-Blog/The-Crosstable-Load/ba-p/1468083 

AG-gugelbisolutions
Creator II
Creator II

Hi there, I would create a table this way:

ITEM_to_SUPPLIER:
LOAD DISTINCT
	ItemID
	ItemSupplierID1 as SupplierID
RESIDENT Items;

CONCATENATE (ITEM_to_SUPPLIER)
LOAD DISTINCT
	ItemID
	ItemSupplierID2 as SupplierID
RESIDENT Items;

CONCATENATE (ITEM_to_SUPPLIER)
LOAD DISTINCT
	ItemID
	ItemSupplierID3 as SupplierID
RESIDENT Items;

Hope it helps.

harm_dataspark
Partner - Contributor III
Partner - Contributor III
Author

Though both suggestions might work, I went for the second one (from @AG-gugelbisolutions). Works like  a charm!